ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error Changing Button Text (https://www.excelbanter.com/excel-programming/421335-error-changing-button-text.html)

David

Error Changing Button Text
 
My script is stopping on this line when run on Excel 2007:
Selection.Characters.Text = "Click to Create Weekly File" & Chr(10) & "&
Change Date"
It works fine in Excel 2003. What change would I need to make so that it
runs in both 2007 and 2003?
THanks!

Dave Peterson

Error Changing Button Text
 
This has come up before.

It appears that the max number of characters that you can add to the caption is
33. (I don't know a way around that limitation (bug????).)

So you could change your caption or maybe stick a button on different
(hidden???) sheet and just copy it from there (already formatted, too).


David wrote:

My script is stopping on this line when run on Excel 2007:
Selection.Characters.Text = "Click to Create Weekly File" & Chr(10) & "&
Change Date"
It works fine in Excel 2003. What change would I need to make so that it
runs in both 2007 and 2003?
THanks!


--

Dave Peterson

David

Error Changing Button Text
 
Thanks much Dave for the options and quick response!

"Dave Peterson" wrote:

This has come up before.

It appears that the max number of characters that you can add to the caption is
33. (I don't know a way around that limitation (bug????).)

So you could change your caption or maybe stick a button on different
(hidden???) sheet and just copy it from there (already formatted, too).


David wrote:

My script is stopping on this line when run on Excel 2007:
Selection.Characters.Text = "Click to Create Weekly File" & Chr(10) & "&
Change Date"
It works fine in Excel 2003. What change would I need to make so that it
runs in both 2007 and 2003?
THanks!


--

Dave Peterson



All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com