Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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

  • Community Leader
  • 24,639 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