#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Auto Load

I have created a user form that has several ComboBoxes.
What i want is for a default value to be present in the
box when the file is loaded. I have managed to use the
activate command to get this to happen if you change to a
different worksheet and then back again. Using this code

Private Sub Worksheet_Activate()
ComboBox1.Text = "Select Model"
ComboBox3.Text = "Select Coverage"
ComboBox2.Text = "Select Coverage"
ComboBox7.Text = "Select Configuration"
ComboBox4.Text = "Select Configuration"
ComboBox6.Text = "Select City"
ComboBox5.Text = "Select City"

But i cannot for the life of me understand how to trigger
this action automatically when the file is first opend !

Any answer would be appreciated

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Auto Load

Hi

I don't understand how you can switch sheets when you have
a userform running, so I guess your comboboxes are on the
worksheet.

Private Sub Workbook_Open()
with worksheets("name")
.combobox1 = "Select Model"
.combobox2 = "config"
etc
end with
end sub

incidentally are you actually loading the comboboxes with
anything?

-----Original Message-----
I have created a user form that has several ComboBoxes.
What i want is for a default value to be present in the
box when the file is loaded. I have managed to use the
activate command to get this to happen if you change to a
different worksheet and then back again. Using this code

Private Sub Worksheet_Activate()
ComboBox1.Text = "Select Model"
ComboBox3.Text = "Select Coverage"
ComboBox2.Text = "Select Coverage"
ComboBox7.Text = "Select Configuration"
ComboBox4.Text = "Select Configuration"
ComboBox6.Text = "Select City"
ComboBox5.Text = "Select City"

But i cannot for the life of me understand how to trigger
this action automatically when the file is first opend !

Any answer would be appreciated

Thanks
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Auto Load

Thanks Libby

I don't really understand what you mean by "loading the
c'boxes with something". They have a cell reference that
they pull the list items from on another worksheet which i
keep hidden usually. If i select a drop down option and
then save the entire file, when it is reopened the
selections i made are saved and populate the box. I don't
want this. I want a default value present on the box
whenevr the whole file is loaded. Does that make sense.?

Kinda new to all this ( if that wasn't immediately
apparent LOL

-----Original Message-----
Hi

I don't understand how you can switch sheets when you

have
a userform running, so I guess your comboboxes are on the
worksheet.

Private Sub Workbook_Open()
with worksheets("name")
.combobox1 = "Select Model"
.combobox2 = "config"
etc
end with
end sub

incidentally are you actually loading the comboboxes with
anything?

-----Original Message-----
I have created a user form that has several ComboBoxes.
What i want is for a default value to be present in the
box when the file is loaded. I have managed to use the
activate command to get this to happen if you change to

a
different worksheet and then back again. Using this code

Private Sub Worksheet_Activate()
ComboBox1.Text = "Select Model"
ComboBox3.Text = "Select Coverage"
ComboBox2.Text = "Select Coverage"
ComboBox7.Text = "Select Configuration"
ComboBox4.Text = "Select Configuration"
ComboBox6.Text = "Select City"
ComboBox5.Text = "Select City"

But i cannot for the life of me understand how to

trigger
this action automatically when the file is first opend !

Any answer would be appreciated

Thanks
.

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Auto Load

Hi

That makes sense about the cell ref.

The code I gave you before for the Workbook_Open event
should still reset the combobox's initial value to
whatever you want'

-----Original Message-----
Thanks Libby

I don't really understand what you mean by "loading the
c'boxes with something". They have a cell reference that
they pull the list items from on another worksheet which

i
keep hidden usually. If i select a drop down option and
then save the entire file, when it is reopened the
selections i made are saved and populate the box. I don't
want this. I want a default value present on the box
whenevr the whole file is loaded. Does that make sense.?

Kinda new to all this ( if that wasn't immediately
apparent LOL

-----Original Message-----
Hi

I don't understand how you can switch sheets when you

have
a userform running, so I guess your comboboxes are on

the
worksheet.

Private Sub Workbook_Open()
with worksheets("name")
.combobox1 = "Select Model"
.combobox2 = "config"
etc
end with
end sub

incidentally are you actually loading the comboboxes

with
anything?

-----Original Message-----
I have created a user form that has several ComboBoxes.
What i want is for a default value to be present in the
box when the file is loaded. I have managed to use the
activate command to get this to happen if you change to

a
different worksheet and then back again. Using this code

Private Sub Worksheet_Activate()
ComboBox1.Text = "Select Model"
ComboBox3.Text = "Select Coverage"
ComboBox2.Text = "Select Coverage"
ComboBox7.Text = "Select Configuration"
ComboBox4.Text = "Select Configuration"
ComboBox6.Text = "Select City"
ComboBox5.Text = "Select City"

But i cannot for the life of me understand how to

trigger
this action automatically when the file is first opend !

Any answer would be appreciated

Thanks
.

.

.

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
csv, how to set excel to auto load Gina_Marano Excel Discussion (Misc queries) 5 November 17th 09 03:19 PM
auto load data from one workbook to another jmw Excel Worksheet Functions 3 February 22nd 06 01:25 PM
File takes 40 minutes to load (auto-calculation) R L Excel Discussion (Misc queries) 1 January 26th 05 10:23 PM
Auto load macros ksgoodwin Excel Programming 1 September 9th 03 05:35 AM
Excel :: Creating Entry Forms that auto load a workbook Dave Peterson[_3_] Excel Programming 0 July 25th 03 05:19 AM


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

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"