Jump to content

Help saving spreadsheets

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
ronhvb03

ronhvb03

    Newbie

  • Members
  • Pip
  • 4 posts
I fairly new to VB I can do some simple things. My most recent involves creating spreadsheets from data that are dependent on selections from a form. This part works fine. My problem becomes apparent when I try and save te newly created spreadsheet. I should add I can get the spreadsheet to save the first time fine. It is when I change selection criteria and rerun the job I have a problem. The sheet saves a book1 and not the new name I have selected/built.
fileSaveName = Application.GetSaveAsFilename(fname, filefilter:="Excel Files (*.xls), *.xls")
    If fileSaveName <> "False" Then
      Application.ActiveWorkbook.SaveAs FileName:=fileSaveName
       Set objWkb = Nothing
       Set objSht = Nothing
       Set objXl = Nothing
     Else
       GoTo fin
   End If

Any help would be appreciated.
Thanks
ronhvb03

#2
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Is this VB.NET.. doesn't seem like VB6.0 to me.

#3
ronhvb03

ronhvb03

    Newbie

  • Members
  • Pip
  • 4 posts
It is indeed VB 6.0. But will more than likley be converted to .Net .

ronhvb03