Re: read from excel sheet by OldDog
OldDog
Tue Feb 27 15:44:23 CST 2007
On Feb 27, 11:01 am, freddy <fre...@discussions.microsoft.com> wrote:
> OK I have to remove about 300 users from different groups.
> Column A would have the different user names and column B would have the
> different groups than I have to write the results to a txt file ot another
> excel file.
This is part one.
This will read from column A of the Excel Spreadsheet Checklist.xls
<----------------------------------------------------------------------------------------------------
>
On Error Resume Next
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("C:\Scripts\Checklist.xls")
x = 4 'Starts at cell A4
Do Until objExcel.Cells(x, 1).Value = ""
If objExcel.Cells(x, 1).Value = "" Then
Exit Do
End If
strComputer = objExcel.Cells(x, 1).Value
'
=====================================================================
' Insert your code here
'
=====================================================================
Loop