Guys/Gals,
Bit of backgroup to help out:
I am a ZENworks administrator for my company and we have 9 differen
sites. On each site I ran a ZEN application that reported whether o
not it ran on user's machines. If the application ran then the use
doesnt have Windows XP SP1 installed.
Problem:
I have created a single workbook that will import all the log file
from each site and compile them into 9 different tabs in an exce
workbook. The macro will successfully run however I am trying to expan
the macro to include error checking and more touchy fealy funtions.
When I run the macro it asks for the file name which I place into
variable called "Report". Currently the macro will then run the belo
command to connect to the log file on "sitea" and import this file.
With ActiveSheet.QueryTables.Add(Connection:="TEXT;\\Se rver UNC path\
& Report, Destination:=Sheets("sitea")
As I currently stand what I wanted to do was something like th
following:
If fs.FileExists("\\Server UNC path" & Report) = True Then
After the then I want to run the above Activesheet.Query macro, if th
if statement is false then I want it to write "File Does Not Exist
into Cell A1 on, in this case the Site1 worksheet
I am currently a bit stumped with this as I cant get the fileexis
funtion to work.
Is anyone able to help me with this or tell me where I am going wrong?
Regards,
Pau
--
Message posted from
http://www.ExcelForum.com