Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

CHECK FILE IS PRESENT OR NOT

0

C:\Users\WolfieeeStyle\Desktop\CD.xlsx

C:\Users\WolfieeeStyle\Desktop\DF.xlsx


my file is located here
i need a vba code that if the cd.xlsx & DF.xlsx file is not present C:\Users\WolfieeeStyle\Desktop\CD.xlsx &C:\Users\WolfieeeStyle\Desktop\DF.xlsx  here then a msg box should came mentioning error that file is not present

i need vba code of the same
so plz help me in solving these problem

Answer
Discuss

Answers

0
Selected Answer
[String variable] = Dir(C:\Users\WolfieeeStyle\Desktop\CD.xlsx)

will return a null string if the file isn't present or the file's name (without path) if it is.

Discuss

Discussion

mam i need a complete code for this problem 
and there are two files mam plz see the problem mam
I am not able to make the code for this problem i am blank about this problem
sunny852 (rep: 2) Mar 4, '20 at 4:54 am
Sorry, Sunny. This isn't a free code writing service. It's "Teach Excel". You aren't a learner. You have needs, I understand, but I need people with questions, not disabilities. Please try another site.
Variatus (rep: 4889) Mar 4, '20 at 6:27 am
Thnx Alot Variatus Mam
sunny852 (rep: 2) Mar 4, '20 at 6:52 am
You are welcome, Sunny. Please don't leave us. We are here to help.
Variatus (rep: 4889) Mar 4, '20 at 7:37 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login