Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Nisha Gor   on Mar 23 In MS Office Category.

  
Question Answered By: Jeanne Lawson   on Mar 23

It's not clear to me exactly what is going on here. In any case, it
sounds as if you should define a bunch of constants and then just go
through the logic of each textbox/option button combination as to
where to put whatever you're putting.


constants would be like:

TheBook="Customers.xls"
Frame1SheetName="Sheet1"
TxBx1OpBt1Col="C"

and logic like:

'assuming txbxBoxName1 is in Frame1
'assuming that you've checked that txbxBoxName1.Text has a number
'assuming that you've already found the row to put the data in

If Not IsEmpty(Me.txbxBoxName1.Text) And Me.opbtButtonName1.Value Then
TheCell=TxBx1OpBt1Col & TheRow
Workbooks(TheBook).Sheets(Frame1SheetName).Range(TheCell).Value= _
WhateverYouArePuttingHere 'e.g., Me.txbxCustomerName.Text
End If


My preference to 'do stuff' like this is after a CommandButton has
been pressed, so I'd add a CommandButton to the Form and put the code
in it. You'd might want to validate data entry in the TextBox_Change
Event.

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on User Form Or get search suggestion and latest updates.


Tagged: