Text to Buttons


Posted by Roy Brunt on August 14, 2001 2:33 PM

Is there any way of putting text from a cell onto a command button, so if the text changes the button changes.

Really need help on this one guy's

Roy



Posted by neotech on August 14, 2001 7:14 PM

Sure! If you're using the buttons on a worksheet (as opposed to a form), put this line of code into the worksheet_selectionchange event:

commandbutton1.caption = range("A1").text

Or, if it's on a form add the name of the form to the from of that line of code, like:

form1.commandbutton1.caption = range("A1").value

neo