Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
control of dialog macro dialog box. on open | Excel Programming | |||
GetOpenFilename Dialog default path | Excel Programming | |||
GetOpenFilename | Excel Programming | |||
GetOpenFileName | Excel Programming | |||
GetOpenFilename | Excel Programming |