View Single Post
  #1   Report Post  
Adam1 Chicago
 
Posts: n/a
Default Global Variable -- Excel / VBA

I currently have a module in VBA that has 6 macros in it. In the third macro
I search down a column that was populated in the second macro. When I
encounter an empty row, I go back up one row and call that row ticker_end
(ticker_end = ActiveCell.Row).

However, when I got to macros 4-6 they don't recognize ticker_end and I have
to search through the column again for the condition I want and re-name the
variable at the start of each macro.

Considering that I can't create the variable before macro 3 because it
depends on actions in macros 2, is there some way once I do set ticker_end I
can make it keep its value through macros 4-6?

Thank you