LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Need to process first row.

How do I change the setup in my spreadsheet or change the code below
so that the first row of the spreadsheet is processed. If I run this
code now it starts out with row 2.

Thanks.

Sub ScratchMacro()
'Set Reference to "Microsoft DAO 3.51 (or 3.6) Object Library".
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim i As Long
Set db = OpenDatabase("C:\Book1", False, False, "Excel 8.0")
Set rs = db.OpenRecordset("SELECT * FROM `mySSRange`")
'Loop through each recordset.
While Not rs.EOF
For i = 0 To rs.Fields.Count - 1
MsgBox rs.Fields(i).Value
Next i
rs.MoveNext
Wend
'Clean up.
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
need to automate process sand Excel Discussion (Misc queries) 3 August 3rd 07 06:20 PM
If/then Process? Zane B Stein Excel Discussion (Misc queries) 1 December 20th 05 03:27 PM
How to count process running time ( process not finished) miao jie Excel Programming 0 January 13th 05 09:23 AM
How to count process running time ( process not finished) miao jie Excel Programming 2 January 12th 05 06:01 AM
step into process Tom Ogilvy Excel Programming 0 August 16th 03 12:46 PM


All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"