+ Reply to Thread
Results 1 to 7 of 7

setting a variable

  1. #1
    Registered User
    Join Date
    10-13-2012
    Location
    CT
    MS-Off Ver
    Excel 2007
    Posts
    39

    setting a variable

    Hi,
    I would like to declair a variable" c:\accounts\GS\Get_GS2018.xlsm as a workbook at the beginning of my program, and use it later on in the code. I tried:
    Please Login or Register  to view this content.
    but I get a out of subscription error.
    I want to open the workbook later in the code.
    Any thoufgts?
    Thanks
    (excel 2007 / PC)

  2. #2
    Forum Contributor
    Join Date
    05-12-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    266

    Re: setting a variable

    why not opening the workbook later? You can only refer to an open workbook.

    Or refer to the workbook path as a String:
    Please Login or Register  to view this content.
    Last edited by SjonR; 08-03-2018 at 01:53 PM.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,884

    Re: setting a variable

    Rule 08: Cross-posting Without Telling Us

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    If you have less than 10 posts, do not try to copy and paste the link. Instead, type the link out in your thread.

    No further help to be offered, please, until the OP has complied with this request.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    10-13-2012
    Location
    CT
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: setting a variable

    hanks that worked

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: setting a variable

    You're welcome. Glad we can offer some help
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,884

    Re: setting a variable

    @gregfox

    Your post does not comply with Rule 7 of our Forum RULES. Please do not ignore requests by Administrators, Moderators and senior forum members regarding forum rules.

    If you are unclear about the request or instruction then send a private message to them asking for clarification.

    All participants:
    Please do not post a reply in a thread where a moderator has requested an action that has not yet been complied with e.g Title change or Code tags...etc. Thanks.

  7. #7
    Registered User
    Join Date
    10-13-2012
    Location
    CT
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: setting a variable

    roger that

+ 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] Setting a Variable?
    By blackcloud9 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-31-2017, 11:57 AM
  2. Setting variable
    By Vlakvark in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2017, 09:14 AM
  3. [SOLVED] Setting a variable range with a variable sheet name. Hmm?
    By starcraftbud in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-11-2013, 11:46 AM
  4. Setting a variable to a variable, not it's current value
    By stockgoblin42 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-03-2013, 10:30 PM
  5. [SOLVED] Need help in setting a variable
    By SMILE in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-10-2013, 05:45 PM
  6. setting a range variable
    By Lazhal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2010, 01:50 PM
  7. Setting a variable
    By ltsimmons in forum Excel General
    Replies: 2
    Last Post: 10-29-2009, 05:02 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