Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combobox with textbox and Commandbutton

Hi

I've created a userform with VBA where the user can select a
value from a Combobox.The rowsource is :Database!C9:C63.

Now I want that the user can select a value from this Combobox,
then fill in something in the textbox.
When the user press Commandbutton the value typed in the textbox mus
me put in the cell linked to the cell from the combobox but a fe
colums further(Q9:Q63).


The colums Q7 till BQ7 are filled with the numbers 1 till 5
representing the numbers of the week.In the userform I want a textbo
where the user can fill in the weeknumber and then going to add value
in that column with the Combobox, textbox and Commandbutton describe
above.

I know it's very hard to make this possible, otherwise I wouldn't hav
bothered you with this, But I hope you'll help me!!!


A lot of Thanks In Advance.

R.Stif

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default Combobox with textbox and Commandbutton

Hi R

If I understand your needs then see if this get you started:

Private Sub CommandButton1_Click()
On Error Resume Next
Dim Cel As Range
' the Q cell:
Set Cel = Cells(9 + ComboBox1.ListIndex, 17)
MsgBox Cel.Address
'the weeknumber column:
Set Cel = Cells(9 + ComboBox1.ListIndex, 16 + Val(TextBox1.Text))
MsgBox Cel.Address
End Sub

HTH. Best wishes Harald

"Stift " skrev i melding
...
Hi

I've created a userform with VBA where the user can select a
value from a Combobox.The rowsource is :Database!C9:C63.

Now I want that the user can select a value from this Combobox,
then fill in something in the textbox.
When the user press Commandbutton the value typed in the textbox must
me put in the cell linked to the cell from the combobox but a few
colums further(Q9:Q63).


The colums Q7 till BQ7 are filled with the numbers 1 till 53
representing the numbers of the week.In the userform I want a textbox
where the user can fill in the weeknumber and then going to add values
in that column with the Combobox, textbox and Commandbutton described
above.

I know it's very hard to make this possible, otherwise I wouldn't have
bothered you with this, But I hope you'll help me!!!


A lot of Thanks In Advance.

R.Stift


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combobox with textbox and Commandbutton

Hi Harald, It's not quite what I mean,but there's something good in it.

Now when I choose from my Combobox and then add text in my textbox an
then press my commandbutton it will give a popup with the right cell.

When I select first option from my combo it returns(Q9)
When I select 2nd option from my combo it returns(Q10)

But I don't want a popup,but I want the text entered in my textbo
filled in that cell

My combobox with the cells where the weeknumbers are found(Q7:BQ7
isn't working yet.

Someone can help me further ??

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combobox with textbox and Commandbutton

Ok adjusted your code a bit now It's almost good:

Private Sub CommandButton1_Click()
On Error Resume Next
Dim Cel As Range
' the Q cell:
Set Cel = Cells(9 + ComboBox1.ListIndex, 17)
Cel.Value = _
Me.TextBox1.Text


Now Only the weekboxproblem must be fixt cuz now it will only
fill week 1(column Q

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Combobox with textbox and Commandbutton

"Stift " skrev i melding
...
Ok adjusted your code a bit now It's almost good:


I really appreciate your improvements <bg

Best wishes Harald


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
ComboBox linked to TextBox capt Excel Discussion (Misc queries) 4 February 19th 08 10:26 PM
TextBox linked to a ComboBox? capt Excel Discussion (Misc queries) 3 February 16th 08 02:50 PM
combobox /textbox value flow23 Excel Discussion (Misc queries) 0 April 19th 06 03:18 PM
UserForm TextBox/ComboBox question grasping@straws Excel Discussion (Misc queries) 1 February 2nd 05 11:14 AM
Userform ComboBox and TextBox help!!! Pete Excel Programming 1 February 13th 04 09:13 PM


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