+ Reply to Thread
Results 1 to 13 of 13

Export to Desktop with some cells as values

  1. #1
    Registered User
    Join Date
    11-24-2020
    Location
    London, England
    MS-Off Ver
    Office
    Posts
    6

    Export to Desktop with some cells as values

    Hi,

    I have been using below macro which works fine to export my current workbook to Desktop. However, cells C4:C19, F16:F19 and I16:I19 needs to be copied and saved as values in the file stored on Desktop.

    Does anyone know how to add this to below code or perhaps can share a new code?

    Please Login or Register  to view this content.
    Kind regards
    Ulrik
    Last edited by AliGW; 11-24-2020 at 04:17 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Export to Desktop with some cells as values

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are new, I did it for you today.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    11-24-2020
    Location
    London, England
    MS-Off Ver
    Office
    Posts
    6

    Re: Export to Desktop with some cells as values

    Dear AliGW,

    Thank you for your help, I will read the information in your link and I will add the tags going forward.

    /Ulrik

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Export to Desktop with some cells as values

    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Registered User
    Join Date
    11-24-2020
    Location
    London, England
    MS-Off Ver
    Office
    Posts
    6

    Re: Export to Desktop with some cells as values

    Dear sintek,

    Thank you for your feedback.

    I have tested with your code and unfortunately the sheet I have open containing formulas is being overwritten to values and the file that the VBA code is saving on the Desktop is still containing formulas. It should be the other way around.

    How can I make the VBA code do the opposite? So that the file i have open/active keeps its formulas and the file on the desktop is being saved as values for cells C4:C19,F16:F19,I16:I19

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Export to Desktop with some cells as values

    And drumroll...Your sample file is where?

  7. #7
    Registered User
    Join Date
    11-24-2020
    Location
    London, England
    MS-Off Ver
    Office
    Posts
    6

    Re: Export to Desktop with some cells as values

    I am a new user, I can't see were on this page I am able to upload a sample file.

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Export to Desktop with some cells as values

    Hi ulrik

    See Top Yellow Banner

  9. #9
    Registered User
    Join Date
    11-24-2020
    Location
    London, England
    MS-Off Ver
    Office
    Posts
    6

    Re: Export to Desktop with some cells as values

    Including Sample.
    Attached Files Attached Files

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Export to Desktop with some cells as values

    So what is the issue...Code works...

    File saved to desktop contains values...Open file with macro remains as is...

  11. #11
    Registered User
    Join Date
    11-24-2020
    Location
    London, England
    MS-Off Ver
    Office
    Posts
    6

    Re: Export to Desktop with some cells as values

    I can only say that it does not work on my computer. Are you perhaps able to send the entire code you are using? In order to make it work.

  12. #12
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Export to Desktop with some cells as values

    It is all your code from post 1...just added the red snippet in post 4

  13. #13
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Export to Desktop with some cells as values

    Alternative to your code...

    Please Login or Register  to view this content.
    Last edited by sintek; 11-26-2020 at 11:10 AM.

+ 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. How do I export files to pdf by naming them with values in two cells
    By sidtaylor333 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-06-2018, 05:49 AM
  2. vba - Export cell range to image on desktop! Help with code
    By ironfelix717 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-15-2017, 06:33 AM
  3. [SOLVED] macro to delete all CSV files on my desktop desktop folders and and its subfolders
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-19-2017, 03:42 PM
  4. [SOLVED] Sheet to be pasted as values & format and save on desktop
    By sushil10s in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-02-2013, 06:21 AM
  5. Export sheets copy/paste Values And Formats with merge cells
    By creusemeninge in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-30-2013, 09:55 AM
  6. VBA Export worksheet to CSV and save on desktop
    By jph89 in forum Excel General
    Replies: 0
    Last Post: 08-30-2012, 11:55 AM
  7. Values to a folder name on desktop
    By Matt in forum Excel General
    Replies: 7
    Last Post: 05-15-2006, 01:00 PM

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