dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Global Variable

  1. #1
    Join Date
    May 2010
    Posts
    12

    Global Variable

    Hi

    Can someone help. How can I set a global variable that can be used from any Excel workbook. I had been told this can be achieved using "personal.xlsb" but the penny is just not dropping on how to finish this.

    Hope I am making sense.

    regards

    Saltkev

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    In case, like many people, those of you reading this have no idea what a "personal.xlsb" is, and you wouldn't if you are using Excel 2003 or lower, it is something introduced with Excel 2007.

    http://www.rondebruin.nl/personal.htm

  3. #3
    Join Date
    May 2010
    Posts
    12

    Simple Solution Found

    Found one solution, might not be the best but it works.


    Unhide PERSONAL.XLSB first


    Code:
     
    
    ' Sets a value to Sheet1 range a1 of the Personal.xlbs,  this is then available from other workbooks/sheets
    
               Workbooks("PERSONAL.XLSB").Sheets("Sheet1").Range("A1").Value = 9999
    
    ' Give the "testval" variable a value within the current workbook/sheet
    
               Dim testval As Integer
    
               testval = Workbooks("PERSONAL.XLSB").Sheets("Sheet1").Range("A1")
    Thanks for looking anyway, if there are any better solutions I would be grateful

Similar Threads

  1. Replies: 5
    Last Post: 04-17-2008, 01:29 PM
  2. Global Variable
    By alphaoide in forum .NET
    Replies: 0
    Last Post: 06-06-2006, 04:35 PM
  3. Global variable
    By veena in forum XML
    Replies: 0
    Last Post: 07-09-2001, 04:16 PM
  4. global variable accessible from stored procedure
    By Michael Shutt in forum Database
    Replies: 2
    Last Post: 03-29-2001, 03:34 PM
  5. Global Variable not being read
    By Roberto Marques in forum Web
    Replies: 0
    Last Post: 06-08-2000, 10:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center