ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   variable declaration for more than one worsheet (https://www.excelbanter.com/excel-programming/435450-variable-declaration-more-than-one-worsheet.html)

Alberto Ast[_2_]

variable declaration for more than one worsheet
 
How do I declare a variable so it will work on more than one worksheeet while
using macros among both worksheets.


Jacob Skaria

variable declaration for more than one worsheet
 
From VBE menu 'Insert' a module and paste the below declaration..

Public strData As String

If this post helps click Yes
---------------
Jacob Skaria


"Alberto Ast" wrote:

How do I declare a variable so it will work on more than one worksheeet while
using macros among both worksheets.


Jacob Skaria

variable declaration for more than one worsheet
 
Hi Alberto

Worth reading this article
http://www.ozgrid.com/VBA/variable-scope-lifetime.htm

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

From VBE menu 'Insert' a module and paste the below declaration..

Public strData As String

If this post helps click Yes
---------------
Jacob Skaria


"Alberto Ast" wrote:

How do I declare a variable so it will work on more than one worksheeet while
using macros among both worksheets.



All times are GMT +1. The time now is 08:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com