+ Reply to Thread
Results 1 to 4 of 4

problem with VBA file naming code

  1. #1
    Registered User
    Join Date
    08-15-2023
    Location
    saudia arabia
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2307 Build 16.0.16626.20170) 64-bit
    Posts
    1

    problem with VBA file naming code

    im new to excel so i hope i explain this well
    i have a workbook with 2 sheets one is named " Contract ' and one is named " Input " so i wrote a code for a button that is in the Input sheet that will print the contents of the " Contract " sheet as pdf, the code worked but when i try to change the file name it wont work
    what is was trying to do was that i wanted the file name to be the value of a cell in the " Input " sheet


    ----------------------------------------------------------------------------------------

    the code that worked :
    ----------------------------------------------------------------------------------------


    Please Login or Register  to view this content.
    ----------------------------------------------------------------------------------------

    the code that wont work:

    ----------------------------------------------------------------------------------------


    Please Login or Register  to view this content.
    Last edited by AliGW; 08-15-2023 at 03:54 AM. Reason: Code tags added - please review the forum rules.

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,418

    Re: problem with VBA file naming code

    Welcome to the forum.

    Please review the forum rules on code tags. Thanks.
    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
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,032

    Re: problem with VBA file naming code

    Try

    Please Login or Register  to view this content.

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,263

    Re: problem with VBA file naming code

    What exactly does "won't work" actually mean, and what is the value in K24?
    Remember what the dormouse said
    Feed your head

+ 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. [SOLVED] file naming from VBA code exporting to PDF
    By VBA_muddled in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-30-2021, 09:50 AM
  2. [SOLVED] Modify Code to Change File Naming Output
    By JPDutch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2017, 06:16 PM
  3. [SOLVED] Problem with same VB Code used on different file
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-07-2013, 08:47 AM
  4. [SOLVED] Problem re-naming a File
    By Rajesg Dutta in forum Excel General
    Replies: 1
    Last Post: 05-03-2013, 09:11 AM
  5. Folder naming + File naming
    By Frozt15 in forum Excel General
    Replies: 2
    Last Post: 07-23-2012, 04:52 AM
  6. csv naming problem
    By blackfolder in forum Excel General
    Replies: 1
    Last Post: 04-03-2011, 05:26 PM
  7. [SOLVED] Problem Naming Worksheet
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2006, 04:35 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