Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default GetOpenFilename changes dialog to modless

Hi,

I have a modal dialog with a browse button. Clicking the button uses the
GetOpenFilename method to populate a text box. For some reason, after
running GetOpenFilename the dialog changes to modeless. Can anyone tell
me why this happens and how to prevent it or cure it?

Thanks,
Alex
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default GetOpenFilename changes dialog to modless

Alex,
Using something like:
UserForm1.Show vbModal
and
TextBox1.Text=Application.GetOpenFileName()

has no effect on the modality of the userform for me.

Are you doing the same ?

NickHK

"Alex Trueman" wrote in message
...
Hi,

I have a modal dialog with a browse button. Clicking the button uses the
GetOpenFilename method to populate a text box. For some reason, after
running GetOpenFilename the dialog changes to modeless. Can anyone tell
me why this happens and how to prevent it or cure it?

Thanks,
Alex



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default GetOpenFilename changes dialog to modless

NickHK,

I'm using the same syntax as you (see below) except that I'm changing
the value property not the text property. I thought that maybe the
modality was being changed so that the 'open' dialog could be displayed.

frmImportVarMods.Show vbModal

and

tbxImportFile.Value = Application.GetOpenFilename( _
filefilter:="text(*.txt),*.txt,all (*.*),*.*", _
Title:="Import File", MultiSelect:=False)

Alex

NickHK wrote:

Alex,
Using something like:
UserForm1.Show vbModal
and
TextBox1.Text=Application.GetOpenFileName()

has no effect on the modality of the userform for me.

Are you doing the same ?

NickHK

"Alex Trueman" wrote in message
...

Hi,

I have a modal dialog with a browse button. Clicking the button uses the
GetOpenFilename method to populate a text box. For some reason, after
running GetOpenFilename the dialog changes to modeless. Can anyone tell
me why this happens and how to prevent it or cure it?

Thanks,
Alex




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default GetOpenFilename changes dialog to modless

Further to last message:

The modality is affected but not completely changed. I can access cells
and the formula editor but not the menus.

Alex

Alex Trueman wrote:

NickHK,

I'm using the same syntax as you (see below) except that I'm changing
the value property not the text property. I thought that maybe the
modality was being changed so that the 'open' dialog could be displayed.

frmImportVarMods.Show vbModal

and

tbxImportFile.Value = Application.GetOpenFilename( _
filefilter:="text(*.txt),*.txt,all (*.*),*.*", _
Title:="Import File", MultiSelect:=False)

Alex

NickHK wrote:

Alex,
Using something like:
UserForm1.Show vbModal
and
TextBox1.Text=Application.GetOpenFileName()

has no effect on the modality of the userform for me.

Are you doing the same ?

NickHK

"Alex Trueman" wrote in message
...

Hi,

I have a modal dialog with a browse button. Clicking the button uses the
GetOpenFilename method to populate a text box. For some reason, after
running GetOpenFilename the dialog changes to modeless. Can anyone tell
me why this happens and how to prevent it or cure it?

Thanks,
Alex





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default GetOpenFilename changes dialog to modless

Alex,
You are able to place the cursor there, but no text can be entered.
I guess that is what Excel takes to be Modal.

NickHK

"Alex Trueman" wrote in message
...
Further to last message:

The modality is affected but not completely changed. I can access cells
and the formula editor but not the menus.

Alex

Alex Trueman wrote:

NickHK,

I'm using the same syntax as you (see below) except that I'm changing
the value property not the text property. I thought that maybe the
modality was being changed so that the 'open' dialog could be displayed.

frmImportVarMods.Show vbModal

and

tbxImportFile.Value = Application.GetOpenFilename( _
filefilter:="text(*.txt),*.txt,all (*.*),*.*", _
Title:="Import File", MultiSelect:=False)

Alex

NickHK wrote:

Alex,
Using something like:
UserForm1.Show vbModal
and
TextBox1.Text=Application.GetOpenFileName()

has no effect on the modality of the userform for me.

Are you doing the same ?

NickHK

"Alex Trueman" wrote in message
...

Hi,

I have a modal dialog with a browse button. Clicking the button uses

the
GetOpenFilename method to populate a text box. For some reason, after
running GetOpenFilename the dialog changes to modeless. Can anyone

tell
me why this happens and how to prevent it or cure it?

Thanks,
Alex








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default GetOpenFilename changes dialog to modless

Thanks NickHK

NickHK wrote:

Alex,
You are able to place the cursor there, but no text can be entered.
I guess that is what Excel takes to be Modal.

NickHK

"Alex Trueman" wrote in message
...

Further to last message:

The modality is affected but not completely changed. I can access cells
and the formula editor but not the menus.

Alex

Alex Trueman wrote:


NickHK,

I'm using the same syntax as you (see below) except that I'm changing
the value property not the text property. I thought that maybe the
modality was being changed so that the 'open' dialog could be displayed.

frmImportVarMods.Show vbModal

and

tbxImportFile.Value = Application.GetOpenFilename( _
filefilter:="text(*.txt),*.txt,all (*.*),*.*", _
Title:="Import File", MultiSelect:=False)

Alex

NickHK wrote:


Alex,
Using something like:
UserForm1.Show vbModal
and
TextBox1.Text=Application.GetOpenFileName()

has no effect on the modality of the userform for me.

Are you doing the same ?

NickHK

"Alex Trueman" wrote in message
...


Hi,

I have a modal dialog with a browse button. Clicking the button uses


the

GetOpenFilename method to populate a text box. For some reason, after
running GetOpenFilename the dialog changes to modeless. Can anyone


tell

me why this happens and how to prevent it or cure it?

Thanks,
Alex






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default GetOpenFilename changes dialog to modless

In Excel 97, there was no option to show Userforms as modeless. However,
Stephen Bullen discovered the "bug" you highlight - that showing the
getopenfilename dialog made the userform modeless. He and Rob Bovey later
discovered that showing getopenfilename actually called an API function
which was the actual cause of this effect. I don't remember the details,
but you can check out the procedure at Stephen's site (where he has
converted it to use the API call rather than showing the getopenfilename).

http://www.BSMLTD.ie

go to the excel page from there.

--
Regards,
Tom Ogilvy

"Alex Trueman" wrote in message
...
Thanks NickHK

NickHK wrote:

Alex,
You are able to place the cursor there, but no text can be entered.
I guess that is what Excel takes to be Modal.

NickHK

"Alex Trueman" wrote in message
...

Further to last message:

The modality is affected but not completely changed. I can access cells
and the formula editor but not the menus.

Alexy

Alex Trueman wrote:


NickHK,

I'm using the same syntax as you (see below) except that I'm changing
the value property not the text property. I thought that maybe the
modality was being changed so that the 'open' dialog could be

displayed.

frmImportVarMods.Show vbModal

and

tbxImportFile.Value = Application.GetOpenFilename( _
filefilter:="text(*.txt),*.txt,all (*.*),*.*", _
Title:="Import File", MultiSelect:=False)

Alex

NickHK wrote:


Alex,
Using something like:
UserForm1.Show vbModal
and
TextBox1.Text=Application.GetOpenFileName()

has no effect on the modality of the userform for me.

Are you doing the same ?

NickHK

"Alex Trueman" wrote in message
...


Hi,

I have a modal dialog with a browse button. Clicking the button uses


the

GetOpenFilename method to populate a text box. For some reason, after
running GetOpenFilename the dialog changes to modeless. Can anyone


tell

me why this happens and how to prevent it or cure it?

Thanks,
Alex








  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default GetOpenFilename changes dialog to modless

Thanks Tom,

That site has some awesome resources.

Alex

Tom Ogilvy wrote:
In Excel 97, there was no option to show Userforms as modeless. However,
Stephen Bullen discovered the "bug" you highlight - that showing the
getopenfilename dialog made the userform modeless. He and Rob Bovey later
discovered that showing getopenfilename actually called an API function
which was the actual cause of this effect. I don't remember the details,
but you can check out the procedure at Stephen's site (where he has
converted it to use the API call rather than showing the getopenfilename).

http://www.BSMLTD.ie

go to the excel page from there.

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
control of dialog macro dialog box. on open Gerry Abbott Excel Programming 0 July 22nd 04 05:41 PM
GetOpenFilename Dialog default path Arthlan Excel Programming 1 June 3rd 04 09:19 PM
GetOpenFilename Chodu Excel Programming 1 May 17th 04 06:17 PM
GetOpenFileName Greg Bloom Excel Programming 2 February 9th 04 04:09 PM
GetOpenFilename Greg Bloom Excel Programming 0 February 9th 04 03:32 PM


All times are GMT +1. The time now is 05:22 PM.

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"