+ Reply to Thread
Results 1 to 3 of 3

Assign variable in public outside procedures

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

    Assign variable in public outside procedures

    Hello everyone
    How can I assign a variable outside the procedures ..in public part of the module
    I tried these lines
    Please Login or Register  to view this content.
    But I got an error ..Is there a way to assign the variable Arr outside procedures as I would use it several times
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Assign variable in public outside procedures

    You probably have to create a public procedure to storage the array first. Each time when you need to reference the array, you will have to call the procedure. For example

    Please Login or Register  to view this content.

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

    Re: Assign variable in public outside procedures

    Thanks a lot for this great solution
    I thought it would be possible to declare and assign public variable and use it all through the procedures without calling
    Generally it is ok and very good solution
    Regards

+ 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] Variable With Value For All Procedures
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2015, 10:48 AM
  2. [SOLVED] Public Variable
    By MarBoTJ in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2015, 03:02 AM
  3. [SOLVED] Creating procedures with variable inputs
    By MarmaladeLover in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-26-2014, 12:03 PM
  4. How to use the same variable in different procedures
    By lubbamkt in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-20-2014, 02:07 AM
  5. Public Variable value
    By nfpaccounting in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2011, 02:34 PM
  6. Public Variable
    By Digitborn.com in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-09-2007, 03:54 PM
  7. Public variable
    By Jack in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 03-18-2006, 05: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