March 26th, 2003, 05:50 PM
Renaming Excel sheet with Visual Basic
How to rename excel sheet from within VBA code (module)?
I need this as I have to export data to access database and no punctuation is allowed. Original names have punctuation.
March 26th, 2003, 08:31 PM
Here is a little snippet that will rename all the sheets in the workbook to "sht"#
Dim txtCnt As Integer
Dim i As Integer
iCnt = Application.Sheets.Count
For i = 1 To iCnt
Application.Sheets(i).Name = "sht" & i
March 27th, 2003, 10:39 PM
I'm glad this snippet worked ...unlike my freshly installed office.
Thank U huge
Last edited by biaz; March 28th, 2003 at 01:28 AM.