Hi Jean-Pierre,
You are on the right track. The following line will do the trick:
ActiveSheet.Name = sInputResponse
When you insert a new worksheet, it will become the active sheet.
Hope this helps
Raymond
"Jean-Pierre Jamous" < CEO%40Jamous.biz">CEO
Jamous.biz>
Sent by: visualbasic6programming%40yahoogroups.com">visualbasic6programming
yahoogroups.com
02/29/2008 07:18 AM
Folks,
I am trying to create a new sheet and rename it. However, I am running
into
an error #9.
Here is what I am using:
Dim sInputResponse As String
sInputResponse = InputBox("Enter a sheet name:")
Application.Sheets("Sheet1").Name = sInputResponse
The problem is the "Sheet1". If I create the sheet and delete it then I
try
to create another sheet, Excel automatically calls this second sheet
Sheet2.
So how can I instead of applying the sheet name statically, use something
like activesheet.name = bla bla. I can keep aggregating the sheet number,
but I'd rather avoid that.
[Non-text portions of this message have been removed]
.