Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a column of cells (G18:G26) that the user can choose "Y" or "N"
directly in the cell. I need to have a macro triggered that opens a user form (it is the same macro for all cells in that range), when they choose "Y". I need to have the results of the user form printed on a unique line in on a new worksheet tab. This way if they choose "Y" to more than one cell (i.e. G18 & G19), I will get 2 sets of output data that don't overwrite each other. I have the user form created and working, but not for multiple cells. This is what I have so far: Private Sub cmdAdd_Click() Dim iRow As Long Dim ws As Worksheet Set ws = Worksheets("Belt Buff") 'specify an empty row in output sheet iRow = 22 'copy the data to the database With ws .Cells(iRow, 12).Value = Me.txtHits.Value .Cells(iRow, 13).Value = Me.txtTop.Value .Cells(iRow, 14).Value = Me.txtSides.Value End With 'clear the data Me.txtHits.Value = "" Me.txtTop.Value = "" Me.txtSides.Value = "" End Sub Any help would be appreciated. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search, Copy, Paste Macro in Excel | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Help with macro looping and color query function | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
Date macro | Excel Discussion (Misc queries) |