Thread: Variable values
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Variable values

DIM the variable before the macros in the module:

DIM v
Sub a()
..
..
..
End Sub
Sub b()
..
..
..
End Sub
--
Gary''s Student


"Ed" wrote:

I've set up two macros "A" and "B" for use on a worksheet.

I assigned a value say 4 to a variable "v" in macro A.

I find that the value 4 does not carry over to a variable "v" in
macro B.

Is there a way to have the variables of macro A apply to all other
macros used with the worksheet?

Thanks,


Ed