Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is there any onLoad kind of function for Excel

Please help,
I am a novice to Excel programming. I wanted to define some variable
and give their initial values and also add some form controls o
loading of the Excel sheet. Is it possible to do it?

Thanks
Samee

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Is there any onLoad kind of function for Excel

In VBA Environment, in the 'Workbook' add the following ...
Private Sub Workbook_Open()
'Do stuff in here
End Sub


"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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
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/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a function that performs a special kind of Vlookup Ayo Excel Discussion (Misc queries) 4 January 20th 10 12:06 AM
Some kind of Array-Sumproduct Function ryguy7272 Excel Worksheet Functions 18 January 24th 09 04:02 AM
?? Some kind of look up function - Help and Thanks A Lot! TJehn Excel Worksheet Functions 2 November 10th 08 12:07 AM
can i make a "repeat until" kind of function in excel2003 JMMendez Excel Discussion (Misc queries) 1 July 9th 06 07:36 PM
how do i plot this kind of data using excel TAMM Excel Discussion (Misc queries) 1 December 11th 04 05:35 PM


All times are GMT +1. The time now is 06:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"