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

I'm trying to send code from a CommandButton2 to Workbook Open. Example:
If Commandbutton2 is "clicked", (which is on a UserForm) then GoTo Workbook
Open() Inputagain: Exit Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Defining a Label


Just copy the inputagain:macro and paste in the command button code,
don't send it back to workbook open :


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=516639

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Defining a Label

I need to some how send a message to my other code which is in the Workbook
open() and tell it to Exit Sub before the other code is executed. Example: If
Commandbuttonw2 is clicked then go to Inputagain which will Exit Sub before
the rest of the code is executed. Don't want anything executed after
"Inputagain" if Commandbutton2 is clicked.
L = Month(Date) * 10000 + Year(Date)
M = GetSetting("Demo", "Drafts", "Month", 0)
If L = M Then Exit Sub
If Month(Date) = 4 Then
If Day(Date) = 24 And Day(Date) < 27 Then
UserForm1.Show
Inputagain: Exit Sub 'Here is the problem!
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




"davesexcel" wrote:


Just copy the inputagain:macro and paste in the command button code,
don't send it back to workbook open :


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=516639


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
Changing the font for part of an axis label, not the whole label. amy45 Charts and Charting in Excel 2 April 5th 23 01:11 PM
How to rezize data label box in pie charts (label wraps to two lin rolliedogg Charts and Charting in Excel 1 October 18th 06 08:17 PM
COPY LABEL FORM FROM EXCEL TO A LABEL xrayAndi New Users to Excel 1 March 5th 06 02:21 PM
how to remove label formatting (eg label to number) sikkiekaka Excel Worksheet Functions 0 November 4th 04 11:35 PM
add text to label (label from forms toolbar) Rob Bovey Excel Programming 0 September 5th 03 09:46 PM


All times are GMT +1. The time now is 11:03 PM.

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"