Link to home
Start Free TrialLog in
Avatar of William C Johnson
William C JohnsonFlag for United States of America

asked on

Excel 2010 VBA Sheet Rename

I am using Excel 2010 VBA with the following variable to get information from a text box for input into a spreadsheet:
    MyProject = SBINumberTextBox.Text
I have no problem with this task.

I also want to use this variable to rename the current (active) sheet.  During the renaming process, I want to start with some static text followed by the variable text.

"SBI(space)" + MyProject

So if the user enters 888 into the text box, the end result should be that the sheet is now titled SBI 888.

Is it possible to use information from a text box in this fashion?

Thanks for your expertise,

Bill
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

I am sure it is possible.

Another question which rises in my mind is: Why do you write this long question with all the explanations instead of simple test of ONE line of VBA code?
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of William C Johnson

ASKER

I'll give this a try.  The reason I try to be specific is that things get lost in the writing translation.  Since there is on dialog I choose to be as clear a possible to avoid these back an forth emails.