LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Variable Button Name based on Data? Can it be done?

How does the month change? If by calculation, use the calculate event. If
by editing, then use the change event. In either case, call your macro.

--
Regards,
Tom Ogilvy

"John Baker" wrote in message
...
Thanks..that does work.

Now, is there any way to activate that macro when the contents of a fiield

changes. For
example, when the month changes in a field?

Regards

John

"Tom Ogilvy" wrote:

you are using but6 as a variable - and since it has not been set to a

value,
it is blank - should blank the caption of the button as well.


Sub test()
'
' test Macro
' Macro recorded 11/21/2003 by John H Baker
but6 = Format(Date, "yyyy_mm_dd")
Sheets("datefunction").Select
Range("f2").Select
ActiveCell() = but6
Sheets("Input").Select
Sheets("input").CommandButton6.Caption = but6
'
End Sub

worked fine for me.




 
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
Need help creating a sum based on variable data. John McKeon New Users to Excel 1 May 7th 10 09:38 PM
can excel insert rown based on variable data in a cell? SSBG Excel Worksheet Functions 1 August 6th 06 01:30 PM
How to import data based on a variable kjp55 Excel Worksheet Functions 8 June 9th 06 12:34 AM
Sum cells based on a row variable and seperate column variable CheeseHeadTransplant Excel Worksheet Functions 10 September 23rd 05 06:59 PM
Getting data from another workbook based on variable joemc911 Excel Discussion (Misc queries) 3 May 25th 05 09:18 AM


All times are GMT +1. The time now is 12:23 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"