Excel VBA Introduction Part 24 - File Dialogs

  Рет қаралды 77,792

WiseOwlTutorials

WiseOwlTutorials

Күн бұрын

If you'd like to help fund Wise Owl's conversion of tea and biscuits into quality training videos you can click this link www.wiseowl.co... to make a donation. Thanks for watching!
You can buy our Introduction to Excel VBA book here www.lulu.com/s...
By Andrew Gould
www.wiseowl.co.uk - Using FileDialogs in VBA provides a convenient method for selecting files and folders and performing useful actions on them. This video covers how to use the standard FileOpen and SaveAs dialogs, and how to perform their default actions. The video also covers the use of the FilePicker and FolderPicker dialogs and how to use FileSystemObjects to process a collection of selected files to perform actions such as copying files to another folder.
Visit www.wiseowl.co.uk for more online training resources in Microsoft Excel, Microsoft Access, Microsoft PowerPoint, Microsoft Word, Microsoft Project, Microsoft Publisher, Microsoft Visio, SQL Server, Reporting Services, Analysis Services, Integration Services, Visual Studio, ASP.NET, VB, C# and more!

Пікірлер: 64
@ousmanetall1286
@ousmanetall1286 7 ай бұрын
This lesson is very very amazing, you covered almost everything we need to understand FileDialog, thanks Andy! You're so brillant!
@WiseOwlTutorials
@WiseOwlTutorials 7 ай бұрын
You're so welcome! Thank you for watching and for the kind comments!
@janezklun
@janezklun 3 жыл бұрын
After 4 years, still fresh and very useful tutorial, Thank you
@WiseOwlTutorials
@WiseOwlTutorials 3 жыл бұрын
Thank you for watching and commenting Janez!
@eisayev
@eisayev 6 жыл бұрын
WiseOwl is the Best VBA Tutorials on the youtube.
@jmathew6988
@jmathew6988 2 жыл бұрын
I have viewed 4 different tutorial videos today including this one and 3 others related to handling ADO recordsets which were helpful and gave me extremely useful knowledge today. As always, your tutorials are thorough, structured and sequenced to cover minute details of a topic being discussed. The least I can do is say "Thank you Mr. Gould" and the WiseOwl Team.
@WiseOwlTutorials
@WiseOwlTutorials 2 жыл бұрын
Thank you for the kind words!
@fredlierman
@fredlierman 10 жыл бұрын
Clear and to the point. Not only a good example of vba file dialogs, but also a good example of how to video tutorials should be.
@jameshutcherson86
@jameshutcherson86 8 жыл бұрын
Andrew, you are a wonderful human being. I recently got hired as an IT Analyst and your videos have been the most helpful thing since I've started. Thank you so much!
@blacksunprison13
@blacksunprison13 5 жыл бұрын
You explain things like no one else. You're helping me immensely for almost everything I need to get done lately. Keep being awesome!
@luismorana5072
@luismorana5072 10 жыл бұрын
Simply, Excellent!!. Or..should I say Bravissimo in my own language. Great job Andrew. I have never found such a clear explanation of all subjects in VBA you kindly shared with all of your followers. Cheers.
@tajsay
@tajsay 4 жыл бұрын
Once again simple and wonderful way of explanation ...breaking the big codes to small pieces .I am learning so much and now have enough confidence to work with file dialogues. Many tahnk again Andrew and WiseowlTutorials team.
@simplejuan
@simplejuan 4 жыл бұрын
This is the best tutorial ever.
@chrystalflippo4187
@chrystalflippo4187 8 жыл бұрын
THANK YOU SO MUCH... OMG... IT WAS SUCH A SEARCH AND FINALLY I FOUND YOU.. OMG... THANKS.
@jbkend
@jbkend 6 жыл бұрын
he really is the best.
@kapibara2440
@kapibara2440 Жыл бұрын
Brilliant work Andrew! Thank you.
@WiseOwlTutorials
@WiseOwlTutorials Жыл бұрын
And thank you for watching!
@jll9809
@jll9809 8 жыл бұрын
hi andrew! thank you for creating these amazing tutorials! I've learned alot from watching these!
@amandafernandesramospasson5862
@amandafernandesramospasson5862 4 жыл бұрын
Andrew, you're the best! thanks for this amazing tutorial, i learnt a lot
@donbogdala5428
@donbogdala5428 9 жыл бұрын
This was an excellent tutorial! By far the best I've seen! I hope that you cover pivot tables in a future video!!!
@kumar-manoj
@kumar-manoj 3 жыл бұрын
Thank you so much sir, for this beautiful tutorial 💯
@WiseOwlTutorials
@WiseOwlTutorials 3 жыл бұрын
Happy to hear that you enjoyed it Manoj!
@smedridha5564
@smedridha5564 4 жыл бұрын
you videos are very useful, they are very benefique for me, thenk you very match ( excuse my english i am from Algeria)
@CowboyCola6
@CowboyCola6 2 жыл бұрын
最好的关于vba的视频
@WiseOwlTutorials
@WiseOwlTutorials 2 жыл бұрын
Thank you!
@mehmetcanbulat8361
@mehmetcanbulat8361 10 жыл бұрын
Perfect Again. I have learned so much from you Andrew (:
@suhailmujawar1350
@suhailmujawar1350 10 жыл бұрын
Excellent Stuff..Andrew
@b.petrushchak
@b.petrushchak 9 жыл бұрын
Thank you for an interesting lecture.
@rudolfpapa
@rudolfpapa 7 жыл бұрын
Many thanks to you, Andrew :)
@jaredopondo3225
@jaredopondo3225 8 жыл бұрын
Many thanks, very insightful
@yidianwang491
@yidianwang491 10 жыл бұрын
Fantastic. Thank you so much. Really helpful
@Fly0High
@Fly0High 8 жыл бұрын
I've been following your videos. They've been just perfect, clear and easy to follow. I'm using a Macintosh system and trying to apply Excel VBA to work on both Mac and Win. I'm actually surprised of how much can be done even with the limitations Office for Mac has. I was wondering though, do you know of any alternative Library for the FileSystemObjects functions or do you have any advise on how to work around these limitations?
@ToddQuest
@ToddQuest 7 жыл бұрын
These are wonderful!! I found that if you end the fd.InitialFileName with a backslash then it won't have the folder name in the dialog box fd.InitialFileName = Environ("UserProfile") & "\Desktop\"
@chingiz648
@chingiz648 3 жыл бұрын
very clear
@WiseOwlTutorials
@WiseOwlTutorials 3 жыл бұрын
Thanks!
@tiburciolapanak
@tiburciolapanak 9 жыл бұрын
excellent! i've learned a lot. tnx.
@alvindominguez9009
@alvindominguez9009 7 жыл бұрын
Hello Andrew, Thanks for your videos, I really learned a lot from them. However, in this video I got a problem where no files showing when I execute the codes from your last module. Thanks for the help.
@dukestt
@dukestt 9 жыл бұрын
Why does the button name only change after you have selected the file you want to open. I would have thought that was like the title property of the FD box.
@arunbs1067
@arunbs1067 Жыл бұрын
How to automatically click on the save button in the Save as dialogue box?
@jenluanhoi7209
@jenluanhoi7209 8 жыл бұрын
Thank you for another great, wonderful tutorial. (It is ME again. Sorry about that.). I have a question. Would you provide a code for DELETING. In other word, instead of SAVE or OPEN a file, I would like to be able to DELETE it or send it to recycle bin. Thank you for your help.
@chanderkantdabral9933
@chanderkantdabral9933 6 жыл бұрын
Hey Andrew, thanks to u....Learning a lot from ut videos got stuck with one code.... Want to compare multiple cell values that these are same or not....Not able to find a generic code which will work for any range of cells....Have recorded a code with macro but using and(exact....) But this wasn't worked....Can u help me out here
@vaidehicrs9898
@vaidehicrs9898 6 жыл бұрын
Hi Wise Owl, From your video -24 on File Dialogues, I have figured how to prompt the user where to save a particular excel sheet and in which format. Thanks! But now, Could you tell me how to select a few excel sheets and paste them all in one single workbook one below the other? I know how to use the file dialogue box to open the excel files but they are all opening into separate worksheets. I want all of them in a single worksheet and one below the other. Please help! Thanks Vaidehi
@vaidehicrs9898
@vaidehicrs9898 6 жыл бұрын
Hi Wise Owl, Is there any way to copy multiple .csv files into one single workbook. Also the copied sheets should all be - one below the other - in the 1st sheet of the workbook.
@cratos900
@cratos900 8 жыл бұрын
I get this error while using the exact code for FileDialog(msoFileDialogSaveAs) as you showed in the video: "method execute of object file dialog failed" Please Help
@tykahalcomb2516
@tykahalcomb2516 9 жыл бұрын
I had an error that said "Path not found" I copied everything you typed and checked for typos but didn't see any
@mohamedal-musallam4884
@mohamedal-musallam4884 5 жыл бұрын
I want to thank you for your amazing videos. But I have a question, how can write a code in VBA to attach a report in Access Database into Outlook without using DoCmd function. I was hoping to use like a path link for this. Is it possible?
@vaidehicrs9898
@vaidehicrs9898 6 жыл бұрын
Hi Wise Owl, I figured it out. Thanks anyways. Regards Vaidehi
@nicholassarikas7904
@nicholassarikas7904 7 жыл бұрын
Hello andrew, im stuck with something. I need to make a macro where i chose a file, then copy cells from the chosen file to the current one where the macro is executed. But I dont know what to do when trying to pass it into Workbooks().Worksheets() and so on
@shahimkhlaifat
@shahimkhlaifat 9 жыл бұрын
I'm wondering how this test which button clicked works, it is working perfectly Sub savefile() Dim fs As FileDialog Dim chosen As Boolean Set fs = Application.FileDialog(msoFileDialogSaveAs) fs.Show If chosen = False Then MsgBox "hello" Exit Sub Else fs.Execute End If
@shahimkhlaifat
@shahimkhlaifat 9 жыл бұрын
thank, this helps a lot, thank you again
@shahimkhlaifat
@shahimkhlaifat 9 жыл бұрын
just wondering why didn't you use the ‘buttons’ parameter : Cancel to check if it was clicked, this what you teach us to get the result
@shahimkhlaifat
@shahimkhlaifat 9 жыл бұрын
thanks, thats why i start hating OOP, you can never expect what they do have and they dont have for you to use, the most programming language i liked really is C, it is so clear, you feel that you are really programming instead of just filling out parameters, thank you Andrew, really you are so helpful
@iamsopure1043
@iamsopure1043 8 жыл бұрын
Thank you for the great video and also I wonder why will statement like "if not FileWasChosen then" work? Shouldn't it be something like "if not FileWasChosen = 0 then" or "if not FileWasChosen 0 then"?
@iamsopure1043
@iamsopure1043 8 жыл бұрын
***** I see. Thanks for your patient reply.
@alesloom
@alesloom 6 жыл бұрын
when showing or prompting file dialog fldr picker on excel 2013 . it takes very long time for me to pick the folder . it looks like the file dialog freezes , it functions and responds quickly on 2016, 2010 and 2007. what is the reason ?
@alesloom
@alesloom 6 жыл бұрын
Thanks for your reply . i will try to find a solution .by the way thanks for your tuts again. they really helped me a lot.
@SantoshLoka
@SantoshLoka 7 жыл бұрын
can we open multi workbooks at a time with code ?
@itzyarana1717
@itzyarana1717 6 жыл бұрын
thank you!!!!!
@vaidehicrs9898
@vaidehicrs9898 6 жыл бұрын
Hi Wise Owl, I have used a file Dialogue box .. to prompt the user for a folder (where all my files are present). I have created a Dim ButtonClicked As Boolean. If Not Button Clicked Then MsgBox "You Didnt Choose!" Exit Sub End If But when I clicked 'Cancel' it is storing the default value of ButtonClicked as False. So, when I run the macro the next time and Select a folder and Click 'OK' it is saying "You didnt choose!" Which is an error. So please tell me if there is any way to set the ButtonClicked Boolean value to nothing at the end of the macro. Technically VBA shouldnt store any local variable's value after the macro ends. So, Why am I getting this error ? I would appreciate if you could reply! Regards Vaidehi
@vaidehicrs9898
@vaidehicrs9898 6 жыл бұрын
FYI, I have not used any static variables in my code.
@vaidehicrs9898
@vaidehicrs9898 6 жыл бұрын
Hey I got it! I made a simple mistake. I found this when I watched your above video again. I forgot to assign the Boolean to the fd.Show ButtonClicked = fd.Show Thanks & Regards Vaidehi
@salvatorescuderi6928
@salvatorescuderi6928 7 жыл бұрын
hi When i declare a fd as filedialog type it run a warning:" module is not a valide type Why?
@salvatorescuderi6928
@salvatorescuderi6928 7 жыл бұрын
hi andrew i resolved it declaring as office.FileDialog. thank you however. Your tuts here are very useful and well done. But just a few note: you talk tooooo speed. I know that video can become too long but try to decelerate a bit ahah. Have a good weekend.
Excel VBA Introduction Part 25 - Arrays
1:00:24
WiseOwlTutorials
Рет қаралды 228 М.
Excel VBA Introduction Part 22 - Files and Folders (FileSystemObjects)
48:33
АЗАРТНИК 4 |СЕЗОН 2 Серия
31:45
Inter Production
Рет қаралды 1,1 МЛН
How Strong is Tin Foil? 💪
00:26
Preston
Рет қаралды 78 МЛН
Power Query - Avoid "Helper Queries" (+10 Cool Tricks)
18:40
Excel VBA Introduction Part 11.1 - Input Boxes
20:35
WiseOwlTutorials
Рет қаралды 135 М.
Excel VBA Introduction Part 56.3 - Read and Execute SQL Query Files
43:34
Excel VBA Introduction Part 26 - Constants and Enumerations (Const, Enum)
32:01
Excel VBA Introduction Part 23 - Text Files (FileSystemObjects)
51:33
WiseOwlTutorials
Рет қаралды 108 М.
How to use Custom Types To Write Ultra Fast VBA code
12:51
Excel Macro Mastery
Рет қаралды 31 М.