View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Is there any onLoad kind of function for Excel

Sameer,

More detail would be helpful, such as when do those variable need to be
initialised, and will they be used in one macro. or many.

You could create public constants and assign values if the value will never
change, or public variables if they are required in many macros. In
idealisation could be done in the Workbook_Open event or at the start of a
procedure.

As for the controls, it is probably better not to create the controls when a
sheet is loaded, it could be loaded many times, but add them manually, and
then just use them in the sheet.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"sameerce " wrote in message
...
Please help,
I am a novice to Excel programming. I wanted to define some variables
and give their initial values and also add some form controls on
loading of the Excel sheet. Is it possible to do it?

Thanks
Sameer


---
Message posted from http://www.ExcelForum.com/