Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
displaying input data on user form as currency | Excel Programming | |||
How do I create a User form to input Data into an Ecel spreadsheet | Excel Programming | |||
Data Input - User Form Drop-Down Box | Excel Programming | |||
User Input Form | Excel Programming | |||
Help with a User Input Form | Excel Programming |