View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
dan dan is offline
external usenet poster
 
Posts: 866
Default Assigning Name to new workbook

Want to assign a name to a worksheet based on user input.

DataFileName = Application.GetOpenFilename(filefilter:="Text or ASC Files,
*.txt; *.asc", Title:="Select the Data File")

'Create A New WorkBook With One Worksheet
Workbooks.Add template:=xlWorksheet

Want the workbook name to be the same name as that opened by DataFileName
and not "Sheet1".

Thanks