excel - If File path does not exits then exit sub -
Hey, I'm quite new in Excel and I'm running into problems with handing error. I want to run my macro and if he can not find the folder then it has to give a message to the users and the sub has to be found.
Worksheets ("input data"). Any help would be appreciated! Below is my code where my macro file is saved
worksheet ("input data"). View = true folder = "\\ Group_SHARED \ Group Shared \ Engineering \ Controlled Folder \ Number_Checkout \ Archived \" MyTime = Time Sheets ("Input Data"). Select range ("G2"). Value = MyTime strFileName = folder & amp; "_" & Amp; Sheet ("input data"). Range ("C6"). Value & amp; "_" & Amp; Sheets ("Get_ECN"). Range ("B6") Value & amp; "_" & Amp; Sheet ("input data"). Range ("C3"). Price & amp; "" & Amp; Sheet ("input data"). Range ("C4"). Value Worksheets ("Input Data"). Visible = Invalid Active Directory Book Save file name: = strFileName
: As
sub-testing () folder = "c: \ user \ administrator \" if dere (Folder) = "" Then MSBBX "None Directory" Exit sub Else Mssbox "Yes, its it's right." End End
Comments
Post a Comment