View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sharad Naik Sharad Naik is offline
external usenet poster
 
Posts: 212
Default Holding form control values within VBA

Now what exactly you mean by holding?
To hold within run time as long as application is running you can use
Public Variables declared at module level.
Or do you want to hold the values even after closing the application?
Then this is not possible. You will have to either save in a seperate sheet.
You can keep this sheet unvisible, protected etc. (In the code you unprotect
it when eveer entering data in to it and protect back when done.)
Or you will have to write the data in to a text file. Open and close that
text file
as and when needed. It will be little complicated that using a sheet.

Sharad

"Darren" wrote in message
...
I have a similar question to that what Dave made earlier.... I want to be
able to have a userform, with comboboxes, textboxes etc, and hold the
values
that are entered within the form / code and not by setting the control
source
to a worksheet. The simple reason is that I dont want to have a seperate
sheet, that has to be hidden, and protected by workbook protection
passwords
etc. It would be better to hold it all within the VBA, and just protect
the
VBA project.

I want to be able to use the form on different reports, by importing the
form and attached code.

I have a feeling that this might not be possible, but can anyone help?

Thanks,

Darren