|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Renaming Excel sheet with Visual Basic
Hey
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. Thanks |
|
#2
|
||||
|
||||
|
Here is a little snippet that will rename all the sheets in the workbook to "sht"#
Code:
Dim txtCnt As Integer
Dim i As Integer
iCnt = Application.Sheets.Count
For i = 1 To iCnt
Application.Sheets(i).Name = "sht" & i
Next
|
|
#3
|
||||
|
||||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Renaming Excel sheet with Visual Basic |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|