basic basic stuff

T

themangostays

hi,

Call me dumb, but I've written a simple excel VBA macro that pulls the
values of various cells from various sheets on a simple invoicing
package i'm working on. One of the sheets is a reference sheet
containing client and job specific data. This sheet is then referenced
against the financial data sheet.
Why oh why can't I declair public variables that can be transfered
between forms/sheets.
I've tried everything. Can one of you clever folk tell me:

1. where should I be storing these procedures. In individual modules,
behind sheets or behind forms

2. how do I get the variables to be passed between the above

3. Where should i be declairing these variables. The're (yes you
guessed it) simple. Just cash values and strings.

Please help

Cheers

[email protected]
 
M

Mark

In order to have a Public variable it needs to be declared in it's own
seperate module. So first insert a new blank module into your project
and in the declarations section try something like this:

Public MyName As String
Public MyValue As String

Now go to your individual sheets and reference these declared
variables. They will be able to be seen all throughout your workbook.
 
Top