Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords:
computername = "\\Fred" ; Start excel here excelxls = objectopen("Excel.Application") excelxls.visible = @true rptxls = excelxls.workbooks ; specify the workbook to look thru... excelfile = "D:\Report Stage\sa\temp\CORP1_DTS.xls" rptxls.open (excelfile) awb = excelxls.activeworkbook awbws = awb.worksheets found = 0 for x = 1 to awbws.count currws = awb.worksheets(x) currwsname = currws.name message("Worksheet", currwsname) ; on the current worksheet, look thru the first 10 rows of the A column... for row = 1 to 10 col = 1 actSheet = excelxls.activesheet thecell = actSheet.Cells(row,col) message("Row %row% Column %col%", thecell.value) if StrUpper(thecell.value) == strUpper(computername ;<<<< Checks for computer name found = 1 ;<<<< Run("somefile.exe","") ;<<<< break ;<<<< endif ;<<<< next if found == 1 then break next excelxls.quit objectclose(excelxls) exit
Article ID: W15643
File Created: 2003:05:13:11:29:20
Last Updated: 2003:05:13:11:29:20