Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default really basic (pardon the pun) problems

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default really basic (pardon the pun) problems

Hi,
Declare the variables in a general module - which is where you
should put your macros (unless they are associated with a userform or an
event) as below. When you open a general module you will see the caption
(Declarations) in the top right "drop down" - type in the declarations of the
Public variables. When completed i.e. when first SUB statement is encountered
a line will appear between the declarations and the macro.

HTH

Public myvar As String <=== Declare these first then add your macro(s)
Public thisvar as integer

Sub mysub1()

End Sub

Sub Mysub2

End sub
" wrote:

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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default really basic (pardon the pun) problems

Hi The MangoStays,

See also responses to your post in the Excel group.


---
Regards,
Norman



wrote in message
oups.com...
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with excel and visual basic for applications Edward Letendre Excel Discussion (Misc queries) 0 September 24th 09 11:03 PM
Basic bar graphs using rept function - Printing problems Andreww Excel Worksheet Functions 4 February 3rd 07 01:30 PM
Problems in Visual Basic Editior, In search of a command Matt G[_7_] Excel Programming 3 June 17th 04 04:06 PM
Any Visual Basic Users Having Mouse Scrolling Problems? SidBord Excel Programming 13 April 27th 04 02:57 AM
A few problems Programming to the Visual Basic Editor Chip Pearson Excel Programming 2 September 17th 03 05:18 AM


All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"