Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a worksheet from a combobox
Hi,
I have created a user form that contains two text fields that fill data starting from "C1" on a worksheet (text entries going in C1 & C2) These entries (different values) need to be made across several worksheets. So I am trying to place a combobox (cboWSPicker) on the userform that allows me to select the worksheet that I want to work with and then start data filling from cell C1 (there is a CmdOK button that activates this). I can get the form to start data filling from C1 when the worksheet is already 'active' I can make a combobox activate a 'worksheet'. but I cant make the cboWSPicker combobox activate a worksheet and then data entry start from cell C1 when I click the cmdOK button... e.g. In the cboWSPicker Drop down, I choose the value 'Sheet1' in txtC1 i put in the value 10% in txtC2 i put in the value 20% I then click the ok button (CmdOK) and nothing happens (except a load of error messages appear). Can anyone help? Thanks Jamie |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a worksheet from a combobox
With Worksheets(cboWSPicker.Value)
.Range("A1").Value = txtC1.Text .Range("B1").Value = txtC2.Text End With -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "rowlo-efc" wrote in message oups.com... Hi, I have created a user form that contains two text fields that fill data starting from "C1" on a worksheet (text entries going in C1 & C2) These entries (different values) need to be made across several worksheets. So I am trying to place a combobox (cboWSPicker) on the userform that allows me to select the worksheet that I want to work with and then start data filling from cell C1 (there is a CmdOK button that activates this). I can get the form to start data filling from C1 when the worksheet is already 'active' I can make a combobox activate a 'worksheet'. but I cant make the cboWSPicker combobox activate a worksheet and then data entry start from cell C1 when I click the cmdOK button... e.g. In the cboWSPicker Drop down, I choose the value 'Sheet1' in txtC1 i put in the value 10% in txtC2 i put in the value 20% I then click the ok button (CmdOK) and nothing happens (except a load of error messages appear). Can anyone help? Thanks Jamie |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a worksheet from a combobox
Bob,
Thanks for that... Works a treat. Jamie Bob Phillips wrote: With Worksheets(cboWSPicker.Value) .Range("A1").Value = txtC1.Text .Range("B1").Value = txtC2.Text End With -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "rowlo-efc" wrote in message oups.com... Hi, I have created a user form that contains two text fields that fill data starting from "C1" on a worksheet (text entries going in C1 & C2) These entries (different values) need to be made across several worksheets. So I am trying to place a combobox (cboWSPicker) on the userform that allows me to select the worksheet that I want to work with and then start data filling from cell C1 (there is a CmdOK button that activates this). I can get the form to start data filling from C1 when the worksheet is already 'active' I can make a combobox activate a 'worksheet'. but I cant make the cboWSPicker combobox activate a worksheet and then data entry start from cell C1 when I click the cmdOK button... e.g. In the cboWSPicker Drop down, I choose the value 'Sheet1' in txtC1 i put in the value 10% in txtC2 i put in the value 20% I then click the ok button (CmdOK) and nothing happens (except a load of error messages appear). Can anyone help? Thanks Jamie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need to update a ComboBox when selecting a sheet | Excel Worksheet Functions | |||
Event when selecting an item in a combobox? | Excel Programming | |||
Selecting any cell in a column I want my ComboBox to show. How? | Excel Discussion (Misc queries) | |||
Selecting AutoFilter option based on ComboBox value | Excel Programming | |||
Selecting a worksheet with a ComboBox | Excel Programming |