+ Reply to Thread
Results 1 to 7 of 7

VBA - Open Save As dialogue box - to save named range

  1. #1
    Registered User
    Join Date
    08-07-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    86

    VBA - Open Save As dialogue box - to save named range

    Hi

    I need to have a macro button that Opens the Save As dialogue box, with PDF already selected. But it needs to save for a Named Range ("Scores") only.

    I needs to have the option to save to different files each time, and different names - thus why it needs to Open the Save As box - and not actually save. I have some code that will save the named range as a pdf to a pre-determined place that works fine - but not what I need.

    Any help would be much appreciated.

    Cheers

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: VBA - Open Save As dialogue box - to save named range

    Have a look at the FileDialog on google, and then change your existing codes file name to the output of this.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    08-07-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    86

    Re: VBA - Open Save As dialogue box - to save named range

    Thanks nathansav.
    I'm a relative vba novice, and having looked it up I cant work out what I's supposed to do.

    To shed a little more light:

    I have sourced the following macro that saves the named range selection as pdf - but to a fixed location/filename:

    Please Login or Register  to view this content.
    I need to amend/change this so that it Opens the Save As box first, to give me the option to amend the file path / filename before actually saving.

    Thanks

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: VBA - Open Save As dialogue box - to save named range

    Did this not help 1st Google result

    http://msdn.microsoft.com/en-us/libr...ffice.11).aspx

    Then the output from that code, you replace your e:\ filename

    also no point in ChDir either???

  5. #5
    Registered User
    Join Date
    08-07-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    86

    Re: VBA - Open Save As dialogue box - to save named range

    Ok I tried this, and it brings up the Save As dialog box. But that's all it seems to do?

    I want it to pre select save as PDF (with my named range selection only selected).

  6. #6
    Registered User
    Join Date
    08-07-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    86

    Re: VBA - Open Save As dialogue box - to save named range

    Ok I tried this, and it brings up the Save As dialog box. But that's all it seems to do?

    I want it to pre select save as PDF (with my named range selection only selected).

  7. #7
    Registered User
    Join Date
    08-07-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    86

    Re: VBA - Open Save As dialogue box - to save named range

    I sorted it myself:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Command button to open Save As dialogue box for new spreadsheet and copy data.
    By valhallaone in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-20-2013, 07:08 PM
  2. Save As PDF using Save As dialogue
    By ukhellfire in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-14-2013, 02:25 PM
  3. VBA/Macro Code needed to open 'Save As' dialogue box and set the file type to CSV
    By daleski in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2013, 12:58 PM
  4. [SOLVED] VBA code to 'click' Open in the Open or Save dialogue box on a webpage?
    By bensox in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-31-2012, 05:40 AM
  5. how to modify,save as new Named Range?
    By jrsyangl in forum Excel General
    Replies: 5
    Last Post: 01-08-2012, 10:59 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1