Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
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
Need to update a ComboBox when selecting a sheet [email protected] Excel Worksheet Functions 1 October 31st 07 02:23 PM
Event when selecting an item in a combobox? Filips Benoit Excel Programming 0 July 7th 06 11:32 AM
Selecting any cell in a column I want my ComboBox to show. How? ABP MLundqvist Excel Discussion (Misc queries) 4 March 1st 06 01:15 PM
Selecting AutoFilter option based on ComboBox value clmarquez[_3_] Excel Programming 2 December 9th 05 01:24 AM
Selecting a worksheet with a ComboBox Todd Excel Programming 3 July 28th 04 09:37 PM


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