+ Reply to Thread
Results 1 to 12 of 12

Macro to remove/change some fields and save the file.

  1. #1
    Forum Contributor
    Join Date
    09-19-2014
    Location
    Michigan
    MS-Off Ver
    Excel 2007, 2010, 2013
    Posts
    145

    Question Macro to remove/change some fields and save the file.

    Hello all. I am new to this forum but you all have helped me do this so far but I can't find what I am looking for, so I going to try to explain the best I can.

    I am trying to simplify when I write a work order for where I work. I have ready created a SAVE AS button to save the file as a specific name and in a specific folder.
    But now I want to know if there is a way to completely remove everything circled in red below, and do like a "paste special" and "values" for everything in blue. Because the person who prints the work orders does not like what I am doing to make my life easier. So basically I want her to not know anything about it.

    Untitled.jpg

    Hope someone can help me.

    And here is what I wrote for my SAVE AS BUTTON.

    Please Login or Register  to view this content.
    Last edited by OpOrange; 09-19-2014 at 03:34 PM. Reason: Solved

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to remove/change some fields and save the file.

    Hi, and welcome to the forum. Unfortunately your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    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

    Since you're new here I'll change it for you on this occasion but please note for the future.


    (
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    09-19-2014
    Location
    Michigan
    MS-Off Ver
    Excel 2007, 2010, 2013
    Posts
    145

    Re: Macro to remove/change some fields and save the file.

    I apologize. Thank you for your help.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to remove/change some fields and save the file.

    Hi,

    Untested but try...

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-19-2014
    Location
    Michigan
    MS-Off Ver
    Excel 2007, 2010, 2013
    Posts
    145

    Re: Macro to remove/change some fields and save the file.

    That worked, I had to move the clear to the bottom since it was clearing the data before pasting it.

    The one thing it didn't get rid of was my button. Any way to make that happen?

  6. #6
    Forum Contributor
    Join Date
    09-19-2014
    Location
    Michigan
    MS-Off Ver
    Excel 2007, 2010, 2013
    Posts
    145

    Re: Macro to remove/change some fields and save the file.

    Also what would the code me to make cells; A3:A15 have no color fill?

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to remove/change some fields and save the file.

    Quote Originally Posted by OpOrange View Post
    Also what would the code me to make cells; A3:A15 have no color fill?
    Hi,

    Please Login or Register  to view this content.
    ..and the button..
    Please Login or Register  to view this content.
    Change the sheet CODE name and 'button' name as necessary

  8. #8
    Forum Contributor
    Join Date
    09-19-2014
    Location
    Michigan
    MS-Off Ver
    Excel 2007, 2010, 2013
    Posts
    145

    Re: Macro to remove/change some fields and save the file.

    Please Login or Register  to view this content.
    How would I have this to make it be a .xlsx file rather than a .xlsm?

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to remove/change some fields and save the file.

    Quote Originally Posted by OpOrange View Post

    How would I have this to make it be a .xlsx file rather than a .xlsm?
    You can't. By definition if you have macros in a file then it has to be a .xlsm file. That's what the last 'm' means.

    What's the difficulty with saving it as .xlsm?

  10. #10
    Forum Contributor
    Join Date
    09-19-2014
    Location
    Michigan
    MS-Off Ver
    Excel 2007, 2010, 2013
    Posts
    145

    Re: Macro to remove/change some fields and save the file.

    No difficultly. I just wondered if it could me done. Thought it would be easier to hide what I am doing from the lady that prints the work orders.
    THANKS FOR ALL YOUR HELP WITH THIS!!!

  11. #11
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to remove/change some fields and save the file.

    Hi,

    If you want to confuse her even more then you could save it as a .xlsb file.

    But thinking about this a bit more and since you don't want the lady to even know it's got a macro, you could save it as a .xlsx file. I was just sticking with your original file naming coded.

    Just change the file name to include .xlsx in place of .xlsm and format the FileFormat bit of your code to

    Please Login or Register  to view this content.
    You might also like to consider saving it as a pdf file then the lady in question couldn't use it as an Excel file.

  12. #12
    Forum Contributor
    Join Date
    09-19-2014
    Location
    Michigan
    MS-Off Ver
    Excel 2007, 2010, 2013
    Posts
    145

    Re: Macro to remove/change some fields and save the file.

    Thank you! This has solved my issue!

+ 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. Macro needed to open "File Save As" and change save file type
    By blainerhett in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2014, 02:40 PM
  2. Change Macro to save file in different folder
    By Marvelous in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2013, 02:49 PM
  3. Replies: 1
    Last Post: 09-05-2013, 02:39 PM
  4. Replies: 3
    Last Post: 02-04-2013, 12:18 PM
  5. Macro to remove the option to save as if file was open as read only?
    By extremecorvette in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-17-2011, 03:40 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