Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Setting properties of userform controls with VBA

Hi

I want to be able to set a controls properties, so that they are
"remembered" for the next time that the spreadsheet is openned.

For example;

I have a userform, with a textbox. I can open up the VB editor, and against
"Value" for the textbox, in the forms properties, I can enter a value. This
value is then saved with the form, and does not rely on the textbox getting
its value from elsewhere, each time the form is openned. Is it possible to
set the value with VBA, as though it was typed in on the editor? I know how
to set it with variables, but I want to essentially store the value with the
forms properties. If i try something like;

MyUserform.MyTextbox.Value = Sheets("Sheet1").Range("A1") whilst it will
show the value in the textbox, it does not save the value with the forms
properties.

The basic reason for me needed this, is I want to have a "Spreadsheet
Settings" form, that does not rely on a worksheet for its values. I want
them all to be held within the form.

Any help much appreciated.

Dave



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Setting properties of userform controls with VBA

Dave,

Why do you want to save it with the form, what is wrong with the worksheet?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dave" wrote in message
...
Hi

I want to be able to set a controls properties, so that they are
"remembered" for the next time that the spreadsheet is openned.

For example;

I have a userform, with a textbox. I can open up the VB editor, and

against
"Value" for the textbox, in the forms properties, I can enter a value.

This
value is then saved with the form, and does not rely on the textbox

getting
its value from elsewhere, each time the form is openned. Is it possible to
set the value with VBA, as though it was typed in on the editor? I know

how
to set it with variables, but I want to essentially store the value with

the
forms properties. If i try something like;

MyUserform.MyTextbox.Value = Sheets("Sheet1").Range("A1") whilst it

will
show the value in the textbox, it does not save the value with the forms
properties.

The basic reason for me needed this, is I want to have a "Spreadsheet
Settings" form, that does not rely on a worksheet for its values. I want
them all to be held within the form.

Any help much appreciated.

Dave





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
Unable to see Properties in Design View for controls ts1 Excel Worksheet Functions 0 September 22nd 05 07:55 PM
Setting colors for Controls dsimcox Excel Programming 1 December 2nd 04 04:59 PM
looping through userform controls changing enabled and locked properties JulieD Excel Programming 2 August 14th 04 12:44 PM
Controls & their properties etc Frederick Excel Programming 0 April 2nd 04 04:48 PM
Properties Page is blank for check box Control, other controls Lea Excel Programming 1 August 20th 03 11:57 PM


All times are GMT +1. The time now is 12:38 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"