![]() |
Variable with value before being assigned?
When I execute a piece of code (pressing f8 once), and I hover the
cursor over a variable, I find that there is value already assigned. I can't find this in the declaration section or anywhere else where this value gets assigned. Does anyone know how this can happen? |
Variable with value before being assigned?
All variables get assigned a default value when a VBA program starts.
However that value might get changed by, say, an Initialize, or other, event when a Userform loads. Or by Auto* macros that start when you load Excel, or create worksheets. You need to search thru all code and ant code that might automatically execute prior to the statement of interest. -- http://www.standards.com/; See Howard Kaikow's web site. "Jon" wrote in message om... When I execute a piece of code (pressing f8 once), and I hover the cursor over a variable, I find that there is value already assigned. I can't find this in the declaration section or anywhere else where this value gets assigned. Does anyone know how this can happen? |
All times are GMT +1. The time now is 08:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com