Thread: to textbox
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default to textbox

Assuming a textbox from the control toolbox toolbar:

Private Sub Workbook_Open()
With ThisWorkbook.Worksheets("sheet1")
.Activate
.TextBox1.Activate
End With

End Sub

Put this in the ThisWorkbook code module.

--
Regards,
Tom Ogilvy

"Mark" wrote in message
...
Hi all,

I want locate cursor (on focus) in textbox1 (in sheet1)
when i open workbook.
Is there any code?

Regards
Mark