Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing default name for new sheets in Excel

967 views
Skip to first unread message

Diego Lopez

unread,
Apr 25, 2003, 1:03:48 PM4/25/03
to
Hi! I have Office 2000 in Spanish (I am living in
Argentina), so the new documents have the sheets named
"Hoja1", "Hoja2", etc.
I am trying to use a simulation system made by an
northamerican person, who has hardcoded the sheet names for
the new workbooks as "Sheet#". Let me explin in detail: in
some point at the execution of the simulation, the Macros
call the Workbooks.Add function and the tries to access the
"Sheet1" sheet. Given that my Excel is in Spanish, the
shhets have another name and the macro stops with error.

I would like to know if there is a way to instruct Excel to
create the new sheets with the english convention (Sheet#)
instead of Hoja#. I can live with the english names.

I tried to create the XLStart templates, with no success:
they work OK for a new object created with the Menu item
"New...", but do not work with the Workbooks.Add function.

Thanks for the help you can give me.

Regards,
Diego :D

Ron de Bruin

unread,
Apr 25, 2003, 1:29:22 PM4/25/03
to
You can do this to use a file named Book.xlt in your Xlstart folder

Make a workbook with all the settings you like(change the Tab names)
and save that file as Book.xlt and place it in your Xlstart folder
Every workbook you create now have this settings

You can do the same for your sheets, save a workbook with one sheet and change things you like.
And save it as Sheet.xlt, every sheet you add have the things you changed in it.

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl

"Diego Lopez" <dieg...@topmail.com.ar> wrote in message news:043e01c30b4c$a3bedb00$2f01...@phx.gbl...

Diego Lopez

unread,
Apr 25, 2003, 1:53:58 PM4/25/03
to
Ron: Thank you for the replay. I mentioned that I tried
this approach. It works OK for the new workbooks generated
via "File/new", but does not work with the VBA function.

You can given a try for yourself, trying to generate a new
workbook after creating the book.xlt with an odd name for
the sheets, usingo the VBA method Workbooks.Add.

Regards,
Diego :D

>.
>

Ron de Bruin

unread,
Apr 25, 2003, 2:16:43 PM4/25/03
to
Yes indeed

Sub test()
Workbooks.Add "c:\book.xlt"
End Sub

Or this to choose

Sub a()
Dim FileToOpen
ChDir Application.TemplatesPath
FileToOpen = Application.GetOpenFilename("Excel Templates (*.xlt),*.xlt")
If FileToOpen <> False Then
Workbooks.Open FileToOpen
End If
End Sub

Sub b()
Dim FileToOpen
ChDir Application.TemplatesPath
FileToOpen = Application.GetOpenFilename("Excel Templates (*.xlt),*.xlt")
If FileToOpen <> False Then
Sheets.Add Type:=FileToOpen
End If
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl

"Diego Lopez" <dieg...@topmail.com.ar> wrote in message news:01ca01c30b53$a567f2f0$a101...@phx.gbl...

0 new messages