Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

need help please (new question at bottom)


  • This topic is locked This topic is locked

#16
MaverickSidewinder

MaverickSidewinder

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 257 posts

i dont quite get it sub Terminate executes when you press the Exit X in the corner right?

View Post


Yes, here is my code again:

Sub Form_Terminate()
MsgBox "You pressed the wrong command.", 48, "ERROR"
GoTo Form1
End Sub

  • 0

Advertisements


#17
TwiztidNinja

TwiztidNinja

    Member

  • Member
  • PipPip
  • 51 posts
Private Sub Form_Unload()

instead of

Sub Form_Terminate()
  • 0

#18
MaverickSidewinder

MaverickSidewinder

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 257 posts
Nope. Doesn't work!

Anyone know the code????? ;) ;) :tazz: :tazz: ;) :) :ph34r:

Edited by MaverickSidewinder, 15 June 2005 - 12:49 PM.

  • 0

#19
stu_design

stu_design

    Member

  • Member
  • PipPipPip
  • 217 posts
ok ok what exactly are you trying to do??
  • 0

#20
MaverickSidewinder

MaverickSidewinder

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 257 posts
Hi!

Im trying to modify the msgbox so that if a person clicks on the X button on the form it will appear and tell the person that its not a valid command and return to the form. All i want to do basicaly is de-activate the X button...
  • 0

#21
stu_design

stu_design

    Member

  • Member
  • PipPipPip
  • 217 posts
ok go here for assistance

now, if you use the msgbox that has yes, no, the x is grayed out

and if that does not help u go like this

Sub Macro2()
Dim x As Integer

c = MsgBox("hello", vbYesNoCancel, "Title")

If c = 2 Then
MsgBox "not valid command"
End If

End Sub

hope that helps

Stu Design
  • 0

#22
MaverickSidewinder

MaverickSidewinder

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 257 posts
Do i put that code instead of the Form_Terminate()?

I tried doing that but when i click on the X it just quits with no msgbox...

:tazz:
  • 0

#23
MaverickSidewinder

MaverickSidewinder

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 257 posts
Thank you but your code doesn't work.

After having made a whole module and mdiform it finally worked. (obviously i found those on the internet ;) )

If there is a simple code to apply to a form so that the X is faded then i would really like to know it.

Apart from:

Call MenuRemoveClose ()

Thanks again guys!

:tazz:


- Maverick
  • 0

#24
mpfeif101

mpfeif101

    Member 1K

  • Retired Staff
  • 1,411 posts
Why would you want to block out the X button? The only programs I know that do that are viruses :tazz:
  • 0

#25
MaverickSidewinder

MaverickSidewinder

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 257 posts
Actually im trying to make a program which simulates a virus ;)

But isn't. Like it doesn't harm anything just gives you a scare :tazz:


Anyway, if you don't believe you don't have to help me ;)
  • 0

Advertisements


#26
mpfeif101

mpfeif101

    Member 1K

  • Retired Staff
  • 1,411 posts
Stimulate a virus to scare people? Why would you want to do that? :tazz:

Don't think this is something we want to support. This topic is closed.
  • 0

#27
admin

admin

    Founder Geek

  • Administrator
  • 24,540 posts
Obviously, not something we are going to support.

Topic closed.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP