![]() |
Caption of a button
hi, how do you change the caption of a button from VBA code. The button
is on a sheet called XS003 if that helps...... from VB it is commandbutton1.caption = "blah blah blah" but that dosnt seem to work any help would be appreciated.... thanx --- Message posted from http://www.ExcelForum.com/ |
Caption of a button
Hi
Sure it seems to work. Private Sub CommandButton1_Click() Sheets(1).CommandButton1.Caption = Now End Sub HTH. Best wishes Harald "Dr_Phil " skrev i melding ... hi, how do you change the caption of a button from VBA code. The button is on a sheet called XS003 if that helps...... from VB it is commandbutton1.caption = "blah blah blah" but that dosnt seem to work any help would be appreciated.... thanx --- Message posted from http://www.ExcelForum.com/ |
Caption of a button
yea that does work....but i forgot to say that when my sheet loads i
automativlly adds a command button to it.....let me xplain i have workbook A and when the user types a file name on that sheet an clicks open it opens that file....now when that file opens i want it t add a button to it which will say save and close....this is to make i easer for my staff to use as i need it to be correctly named etc etc.. hope that makes sense -- Message posted from http://www.ExcelForum.com |
Caption of a button
"Dr_Phil " skrev i melding
... i forgot to say that when my sheet loads it automativlly adds a command button to it.(...) when that file opens i want it to add a button to it which will say save and close It's not too clear what works and what doesn't. Please post the code that adds the button if you have it, including the "dosnt seem to work" parts. Best wishes Harald |
Caption of a button
hi,
right: I have a workbook that has an open button on it with a space for a use to enter a file name into, eg "hello". When the user clicks the butto the workbook will add ".csv" to the file name and open it. When thi new workbook opens, "hello.csv", i want a button to be placed on i with the caption "Save". I hope this makes sense -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 09:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com