View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Heine Heine is offline
external usenet poster
 
Posts: 49
Default Add sheets using macro

Thanks - that works great.

Problem is now that if I run the macro more than once an error occurs
because I already added the sheet once. Is there an easy way to get
around that small problem?

/Heine
Gert wrote:
Try an inputbox (or replace the inputboxline with a fixed name)

Sub SheetInsert()

Dim strNameSheet As String

Sheets.Add
strNameSheet = InputBox("give sheet name")
ActiveSheet.Name = strNameSheet

End Sub