Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Add-in question: can I store default values for a form in the Add-in?

My first Add-in. Everything runs well. (Woo-hoo!!)

In the form, I have eight fields with default values that the user can
change in the form.
These values are set in the form's Load event.
But what if the user decides he wants different default values?
I'd hate to make him have to change all eight values each and every
time!

Can I set the default values in cells in the Add-in?
And read them from there during the Load event?
And set an option in the form to save the values entered into the form
into the Add-in as the new defaults?

Ed
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Add-in question: can I store default values for a form in the Add-in?

Ed from AZ used his keyboard to write :
My first Add-in. Everything runs well. (Woo-hoo!!)

In the form, I have eight fields with default values that the user can
change in the form.
These values are set in the form's Load event.
But what if the user decides he wants different default values?
I'd hate to make him have to change all eight values each and every
time!

Can I set the default values in cells in the Add-in?
And read them from there during the Load event?
And set an option in the form to save the values entered into the form
into the Add-in as the new defaults?

Ed


Yes. You just need to save the addin anytime users make changes to
those defaults. Of course, updating the addin will cause users to lose
their default values and so I recommend storing the values in a text
file OR use SaveSetting/GetSetting to store in the Registry. This would
persist per user so any updates to your addin would not be a problem
because the userform can load the values from the storage location.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Add-in question: can I store default values for a form in the Add-in?

Yes. You just need to save the addin anytime users make changes to
those defaults.


Thank you for the response.
Is there a Userform.Parent or similar that gets the add-in workbook?
I looked, but I couldn't find such a thing.
Could build a string from the ground up with the add-in name if I have
to.
It would be easier if there was a simple property.

Ed
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default Add-in question: can I store default values for a form in the Add-in?

Hi Ed

It's
ThisWorkbook

HTH. Best wishes Harald


"Ed from AZ" wrote in message
...
Yes. You just need to save the addin anytime users make changes to
those defaults.


Thank you for the response.
Is there a Userform.Parent or similar that gets the add-in workbook?
I looked, but I couldn't find such a thing.
Could build a string from the ground up with the add-in name if I have
to.
It would be easier if there was a simple property.

Ed


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Add-in question: can I store default values for a form in theAdd-in?

Don't ignore Gary's suggestion NOT to store data in the add-in.

- Jon
-------
Jon Peltier
Peltier Technical Services, Inc.
http://peltiertech.com/


On 9/27/2010 3:13 PM, Ed from AZ wrote:
Yes. You just need to save the addin anytime users make changes to
those defaults.


Thank you for the response.
Is there a Userform.Parent or similar that gets the add-in workbook?
I looked, but I couldn't find such a thing.
Could build a string from the ground up with the add-in name if I have
to.
It would be easier if there was a simple property.

Ed



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
User form - How to store data on press of enter key. NDBC Excel Programming 2 June 29th 09 12:02 PM
thru form update data store in excel deen Excel Worksheet Functions 1 May 28th 08 02:18 PM
store default printer, change printer and then restore default printer? Dennis Pedersen Excel Programming 0 November 14th 07 09:18 PM
Listbox - Store values tjh Excel Programming 1 September 17th 05 12:37 AM
ReDim to store values so they are not used again hotherps[_16_] Excel Programming 0 February 18th 04 06:34 PM


All times are GMT +1. The time now is 09:52 PM.

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

About Us

"It's about Microsoft Excel"