Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    be prompted where I want to get/save a file (Excel 97)

    I use the following below to save a file. How can I fix a macro so it will "pop up" with a message(?) box and I enter the path and or name of the file to be save. Same if I wanted to get a file.

    ChDir "J:EdgarSecurity"
    ActiveWorkbook.SaveAs FileName:="J:EdgarSecuritytest2r.xls", FileFormat _
    :=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
    False, CreateBackup:=False

  2. #2
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: be prompted where I want to get/save a file (Excel 97)

    You could use MyValue = InputBox(Message, Title, Default) - or you could play with the following <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=vb&Number=28049&page=&view= &sb=&o=&vc=1>post</A> - though I'm not sure if that's what you're after. Or could you just call the file save as dialog?

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: be prompted where I want to get/save a file (Excel 97)

    I think you should use the GetSaveAsFilename method of Excel.

    <pre>Sub SaveAsPopUp()
    Dim FileName As String
    Application.GetSaveAsFilename (FileName)
    If FileName <> "" Then
    ActiveWorkbook.SaveAs FileName:=FileName
    End If
    End Sub
    </pre>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •