View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 1,327
Default Button on Userform calling GetOpenFilename

Hi Werner

Weird. I never noticed.
Seems to behave ok if you hide - show the userform though:

Private Sub CommandButton1_Click()
Me.Hide
TextBox1.Text = Application.GetOpenFilename
Me.Show
End Sub

HTH. Best wishes Harald

"Werner Rohrmoser" skrev i melding
m...
Hello,

Situation:
Userform with Button, Button_Click Procedure contains

"Application.GetOpenFilename".
When I have done my file selection the GetOpenFilename dialog
will be closed and I see the calling Userform.
Now the Userform seems to be not modal, I can select cells,
sheets, but I can't enter values in the cells.

Question:
How can I avoid this behaviour, I'd like to have a modal userform as it is

declared.
Thanks

Best Regards
Werner