Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA If Statements


Hello,

The following Code which give me a message to either click Yes or N
How do i Get it to Close UserForm4 when I click on No

Regards
Runner77

Private Sub cmbexit_Click()
MsgAdd = MsgBox("Would you like to place another order?", vbYesNo
"Thank You for Your Order?")
If MsgAdd = vbYes Then UserForm4.Hide
UserForm1.Show
DoEvents
End Su

--
Runner7
-----------------------------------------------------------------------
Runner77's Profile: http://www.excelforum.com/member.php...fo&userid=3038
View this thread: http://www.excelforum.com/showthread.php?threadid=50156

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default VBA If Statements

It appears to me that you want to close UserForm 4 in either event.
Therefo

Private Sub cmbexit_Click()
MsgAdd = MsgBox("Would you like to place another order?", vbYesNo,
"Thank You for Your Order?")
UserForm4.Hide
If MsgAdd = vbYes Then UserForm1.Show
DoEvents
End Sub

Does this work for you?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA If Statements


Thanks Mark,

The Code Works

Regards
Runner7

--
Runner7
-----------------------------------------------------------------------
Runner77's Profile: http://www.excelforum.com/member.php...fo&userid=3038
View this thread: http://www.excelforum.com/showthread.php?threadid=50156

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to do if and or else statements mo Excel Worksheet Functions 1 February 19th 07 11:48 AM
If Statements DeckyT Excel Worksheet Functions 1 February 12th 07 04:23 PM
IF statements profmorse Excel Discussion (Misc queries) 5 December 20th 06 07:41 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
operator statements, shorting when reusing one of the statements? KR Excel Programming 1 August 4th 05 06:20 PM


All times are GMT +1. The time now is 07:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"