Results 1 to 8 of 8

Thread: Save As path help

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Try this:

    Public Sub CommandButton1_Click()
      dim FilePath as string
      FilePath = "V:\B&E Ops Support\Billing And Enrollment\B&E National Unit\National & ASO Profile and COBRA Sheets\"
    If OptionButton1 = True Then
    ThisWorkbook.SaveAs FilePath & Range("B5").Value & ".xls"
    Unload Me
    End If
    If OptionButton2 = True Then
    ThisWorkbook.SaveAs FilePath & Range("B5").Value & ".xls"
    Sheets.PrintOut
    Unload Me
    End If
    End Sub


    I haven't tested it, but I think that should work...

    HTH,
    Last edited by Ken Puls; 12-14-2004 at 11:48 AM. Reason: Added the final slash in the file path
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





Posting Permissions

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