Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Gang,
Here's what I've got so far.....I created a test wb and form with three commandbuttons.....I wish to rename these buttons periodically (only the caption, not the underlying code), using the contents of cells in Col A. The msgbox indicates it's stepping through code correctly but, so far, I can only get it to rename CommandButton1. I've tried all I can think of to get the code to step through the commandbuttons but so far, nothing works for me. Private Sub UserForm_Activate() Dim M As String Dim A As String For N = 1 To 3 M = "CommandButton" & N A = Range("a" & N).Text MsgBox M ' Me.M.Caption = A<<this didn't work as well as various tries at & statements. Me.CommandButton1.Caption = A '<<< this of course only renamed CB1 Next N End Sub And and all help here would be greatly appreciated. TIA, Don |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Need macro to auto set option buttons all to "Yes" or "No" | Excel Worksheet Functions | |||
function to return day in the form "Monday", "Tuesday" etc given . | Excel Worksheet Functions | |||
Shortcut key for "Paste Options" and "Error Checking" buttons? | Excel Discussion (Misc queries) | |||
Standard "Open" and "Save As" Buttons | Excel Programming | |||
Assigning Macro to "Buttons" | Excel Programming |