S
Snoopy
Hey guys ))
Specially thanks to Bob and Ian - who have been very kind and helped
me a lot
However; The more we learn - the more we know how little we know!
So - you guys have carried me over a threshold in using VBA-EXCEL!
Still I find VBA mysterious and difficult to understand some times.
The macroproblem this time is that when my (well.....actueally yours
modyfied ) macroloop has done its work, it will not "jump" to the
next macro - see below
Sub AVD()
displayallert = False
Dim MyFile
' Returns filename with specified extension. If more than one *.xls
' file exists, the first file found is returned.
Sheets("UserDATA").Activate
MyFile = Dir(Range("A6").Value & "\*.xls")
If MyFile = "" Then End ' End subroutine if no *.xls files found
Call aaa(MyFile) ' call your macro
Do While MyFile <> ""
' Call Dir again without arguments to return the next *.xls file in
the same directory.
MyFile = Dir
If MyFile = "" Then End ' End subroutine if no further *.xls files
found
Call aaa(MyFile) ' call your macro
Sheets("UserDATA").Visible = False
' So far - so good
Loop
' Here comes the problem - after "Loop" the macro wil nor proceed
thew BackUp-sequence
BackUpAVD ' will not activate
displayallert = True
End Sub
What can I do to smoothen up this macro?
Best regards
Snoopy
Specially thanks to Bob and Ian - who have been very kind and helped
me a lot
However; The more we learn - the more we know how little we know!
So - you guys have carried me over a threshold in using VBA-EXCEL!
Still I find VBA mysterious and difficult to understand some times.
The macroproblem this time is that when my (well.....actueally yours
modyfied ) macroloop has done its work, it will not "jump" to the
next macro - see below
Sub AVD()
displayallert = False
Dim MyFile
' Returns filename with specified extension. If more than one *.xls
' file exists, the first file found is returned.
Sheets("UserDATA").Activate
MyFile = Dir(Range("A6").Value & "\*.xls")
If MyFile = "" Then End ' End subroutine if no *.xls files found
Call aaa(MyFile) ' call your macro
Do While MyFile <> ""
' Call Dir again without arguments to return the next *.xls file in
the same directory.
MyFile = Dir
If MyFile = "" Then End ' End subroutine if no further *.xls files
found
Call aaa(MyFile) ' call your macro
Sheets("UserDATA").Visible = False
' So far - so good
Loop
' Here comes the problem - after "Loop" the macro wil nor proceed
thew BackUp-sequence
BackUpAVD ' will not activate
displayallert = True
End Sub
What can I do to smoothen up this macro?
Best regards
Snoopy