Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Button on Userform calling GetOpenFilename

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Button on Userform calling GetOpenFilename

Harald,

thanks, I've tested it and it works.

Regards
Werner


"Harald Staff" wrote in message ...
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get userform Cancel button to invoke Exit Sub in calling macro? Craig Remillard New Users to Excel 1 November 19th 09 03:55 AM
Calling a Userform from a Predefined Variable [email protected] Excel Worksheet Functions 0 April 21st 07 03:44 PM
Calling function from a userform Jeff Excel Discussion (Misc queries) 0 September 27th 06 03:27 PM
VBA question - Calling txt file from userform ajliaks[_9_] Excel Programming 2 April 17th 04 09:23 AM
VBA question - calling Procedure from userform ajliaks[_3_] Excel Programming 2 April 14th 04 09:11 PM


All times are GMT +1. The time now is 03:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"