View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Open form on Enter

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Static OldCell As Range
If OldCell Is Nothing Then
Set OldCell = Me.Range("A1")
Else
MsgBox Target.Address & " - " & OldCell.Address
End If
If OldCell.Column = 4 Then
Load UserForm1
UserForm1.Label1.Caption = OldCell.Row
UserForm1.Show
End If
Set OldCell = Target
End Sub

would be a start

--
Regards,
Tom Ogilvy

"JT" wrote in message
...
The user will move to any row in col D. What I would like
is for them to hit the Enter key. When they hit the Enter
Key, the form is displayed.

Is it possible to display a form, have the user key data
into the form, update another sheet in the workbook before
the next cell in the original sheet is activated?

Thanks for the help.

-----Original Message-----
You say move to a specific cell to trigger the form, but

then you want the
form to react to the cell they are in. Wouldn't the cell

always be the
"specifc cell" that triggers the action.

Is specific cell actually a cell on any row in a

particular column. I thing
a clear explanation is needed.

--
Regards,
Tom Ogilvy

"JT" wrote in

message
...
In my macro, the user would to move to a specific cell.
When they hit the "Enter" key, I would like for a form

to
open. The user would then enter data into the form

based
on the line in the spreadsheet that they are in. Once

they
enter all of the data, they would hit a button, the info
would be displayed on another sheet, the form would

close,
and the cell on the next line would be active.

Is this possible? I'm having some trouble getting the
form to display when the "Enter" key is hit.

Any suggestions would be appreciated. Thanks..



.