Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default User Form Data Input

How do I code so a value from a combobox on a forms value will be entered
into a certain cell on a worksheet? Also item from a text box as well.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default User Form Data Input

Try something like

Worksheets("Sheet2").Range("A1").Value = Me.ComboBox1.Value
Worksheets("Sheet2").Range("A2").Value = Me.TextBox1.Value


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"krc547" wrote in message
...
How do I code so a value from a combobox on a forms value will be entered
into a certain cell on a worksheet? Also item from a text box as well.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default User Form Data Input

Similar Question, what if I have several text boxes that would put
information into one cell. For example:

My form has frames and depending on which they choose the remaining frames
become disabled. Each of these frames have a Name option. If someone enters a
name in any of these boxes it goes into cell C18.

"Chip Pearson" wrote:

Try something like

Worksheets("Sheet2").Range("A1").Value = Me.ComboBox1.Value
Worksheets("Sheet2").Range("A2").Value = Me.TextBox1.Value


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"krc547" wrote in message
...
How do I code so a value from a combobox on a forms value will be entered
into a certain cell on a worksheet? Also item from a text box as well.


  #4   Report Post  
Posted to microsoft.public.excel.programming
WHA WHA is offline
external usenet poster
 
Posts: 21
Default User Form Data Input

On Nov 29, 5:44 pm, krc547 wrote:
Similar Question, what if I have several text boxes that would put
information into one cell. For example:

My form has frames and depending on which they choose the remaining frames
become disabled. Each of these frames have a Name option. If someone enters a
name in any of these boxes it goes into cell C18.



"Chip Pearson" wrote:
Try something like


Worksheets("Sheet2").Range("A1").Value = Me.ComboBox1.Value
Worksheets("Sheet2").Range("A2").Value = Me.TextBox1.Value


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"krc547" wrote in message
...
How do I code so a value from a combobox on a forms value will be entered
into a certain cell on a worksheet? Also item from a text box as well.- Hide quoted text -


- Show quoted text -


Try setting the ControlSource property on each control to C18?
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default User Form Data Input



"WHA" wrote:

On Nov 29, 5:44 pm, krc547 wrote:
Similar Question, what if I have several text boxes that would put
information into one cell. For example:

My form has frames and depending on which they choose the remaining frames
become disabled. Each of these frames have a Name option. If someone enters a
name in any of these boxes it goes into cell C18.



"Chip Pearson" wrote:
Try something like


Worksheets("Sheet2").Range("A1").Value = Me.ComboBox1.Value
Worksheets("Sheet2").Range("A2").Value = Me.TextBox1.Value


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"krc547" wrote in message
...
How do I code so a value from a combobox on a forms value will be entered
into a certain cell on a worksheet? Also item from a text box as well.- Hide quoted text -


- Show quoted text -


Try setting the ControlSource property on each control to C18?



I tried that, but comes up exception error. I need to mention thet the
spreadsheet is protected. In my code I unprotect run the form then reprotect
at the end.



  #6   Report Post  
Posted to microsoft.public.excel.programming
WHA WHA is offline
external usenet poster
 
Posts: 21
Default User Form Data Input

On Nov 29, 6:50 pm, krc547 wrote:
"WHA" wrote:
On Nov 29, 5:44 pm, krc547 wrote:
Similar Question, what if I have several text boxes that would put
information into one cell. For example:


My form has frames and depending on which they choose the remaining frames
become disabled. Each of these frames have a Name option. If someone enters a
name in any of these boxes it goes into cell C18.


"Chip Pearson" wrote:
Try something like


Worksheets("Sheet2").Range("A1").Value = Me.ComboBox1.Value
Worksheets("Sheet2").Range("A2").Value = Me.TextBox1.Value


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"krc547" wrote in message
...
How do I code so a value from a combobox on a forms value will be entered
into a certain cell on a worksheet? Also item from a text box as well.- Hide quoted text -


- Show quoted text -


Try setting the ControlSource property on each control to C18?


I tried that, but comes up exception error. I need to mention thet the
spreadsheet is protected. In my code I unprotect run the form then reprotect
at the end.



- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -


If protection is the problem, then you might try setting the
ControlSource property in the VBA code, something like:
Worksheet.Unprotect
MyControl.ControlSource = "C18"
....
MyControl.ControlSource = ""
Worksheet.Protect

Alternately, you can copy&paste&modifyChip's code in several different
places. Better would be to create a helper subroutine:

Sub TransferToC18(v as Variant)
MyWorksheet.Range("C18").Value = v
End Sub

and then have lots of lines like
Call TransferToC18(MyControl.Value)

Hope this helps...
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
displaying input data on user form as currency mantrid Excel Programming 2 April 28th 07 01:56 AM
How do I create a User form to input Data into an Ecel spreadsheet JohannM Excel Programming 1 September 7th 06 05:25 PM
Data Input - User Form Drop-Down Box meflorence[_3_] Excel Programming 2 May 18th 04 02:43 PM
User Input Form Beth[_6_] Excel Programming 2 May 13th 04 01:23 AM
Help with a User Input Form Cody Dawg[_2_] Excel Programming 3 October 9th 03 10:08 PM


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