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

I've almost got this code the way I need it ,But.The point is not to be asked
again once you've answered the Userform and MsgBox. The problem is when I'm
at the UserForm and I have a Commandbutton2 thats a "Remind me Later" when
selected closes the Userform with no data but it still saves the setting and
doesn't open up again untill the next year at that date. Any help at all.
Thanks in Advance:
L = Month(Date) * 10000 + Year(Date)
M = GetSetting("Demo", "Drafts", "Month", 0)
If L = M Then Exit Sub
If Month(Date) = 2 Then
If Day(Date) = 24 And Day(Date) < 27 Then
UserForm1.Show 'Here is the problem with CommandButton2 I Think
If MsgBox("Do you qualify for Bank Day?", _
vbYesNo) = vbYes Then
MsgBox ("1 Day has been added to your Bank Days")
Call SaveSetting("Demo", "Drafts", "Month", L)
Worksheets("Vacation").Range("C3").Value = 1
Else
Worksheets("Vacation").Range("C3").Value = 0
End If
End If
End If

  #2   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default Call SaveSettings

Hi Richard,

Try this:

'Add this variable declaration
Dim Ans as Variant
'this holds the response to your question

To test the response, use it as follows:
Ans = MsgBox("Do you qualify for Bank Day?", vbYesNo)
If Ans = vbYes Then... 'do your thing

If Commandbutton2 is on the userform, then the code for the message and
subsequent response to the question, should be in its Click event. In the
VBE, right-click Commandbutton2 on the userform and select "View Code".

Use something like this to display the userform:
Sub ShowMyForm()
Userform1.Show
End Sub

Once the userform is displayed, it should handle all the code related to its
use.

....hope this helps!
GS
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
SaveSettings Statement - Network based application Howard31 Excel Discussion (Misc queries) 0 December 17th 08 07:22 PM
I'm not sure what you'd call it, but is it possible to do this? nut_mom Excel Discussion (Misc queries) 3 June 28th 06 06:17 PM
Call Center Management: How to calculate 'cost per call' Denniso6 Excel Discussion (Misc queries) 2 June 25th 06 05:01 PM
Run or Call MBlake[_2_] Excel Programming 7 August 27th 05 09:29 PM
Getsetting and Savesettings James[_38_] Excel Programming 2 June 29th 05 08:05 PM


All times are GMT +1. The time now is 02:11 AM.

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

About Us

"It's about Microsoft Excel"