+ Reply to Thread
Results 1 to 3 of 3

How do I assign a workbook to a variable?

  1. #1
    Forum Contributor
    Join Date
    08-03-2009
    Location
    Cary, NC
    MS-Off Ver
    Excel 2016
    Posts
    109

    How do I assign a workbook to a variable?

    I have several workbooks open. I have my VBA code in IOAlarmVBA. I have a separate workbook PLK14A_IOL_001.xlsx that I'm trying to get information from. I don't know the syntax for assigning that workbook to a variable. Here is my code:

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: How do I assign a workbook to a variable?

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: How do I assign a workbook to a variable?

    Maybe:

    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. [SOLVED] assign sheet to variable by code name in another workbook
    By karen53 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-17-2014, 11:27 PM
  2. [SOLVED] Assign entire row to variable, how do you paste variable values in a new workbook?
    By tv69 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2013, 08:01 PM
  3. Replies: 2
    Last Post: 07-24-2012, 11:47 AM
  4. assign variable name to the workbook
    By yjmmay34 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-17-2010, 02:18 AM
  5. Assign the name of the workbook to a variable?
    By syntex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-04-2008, 07:26 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