Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
sub button1_click
Dim a as FileDialog
set a=Application.FileDialog(msoFileDialogPicker)
a.show
end sub


Getting the error message window pointing to line a.show, when i click on button1. even if i use application.displayalerts=false, i still get that error.

Please help
Posted
Comments
Sergey Alexandrovich Kryukov 21-Aug-14 11:58am    
This is not an alert, this is error message. How can we know where your bug might be? :-)
—SA
Member 11027677 21-Aug-14 12:00pm    
Sorry, i really meant an alert. There are not other modules or codes running, the entire excel file has just that sub, called by a commandbutton in sheet1.

1 solution

You have a typo in your dialog initialization, it should read msoFileDialogFilePicker not msoFileDialogPicker.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900