Excel VBA: Count # Columns When Downloading From Database

What VBA do I need to count number of columns of data importing from a database in network.

i.e., Usually to do this you only need the connection string and SQL. SQL = "Select * From..."
ouestqueAsked:
Who is Participating?
 
Rgonzo1971Connect With a Mentor Commented:
HI,

pls try
varCount = myRecordset.Fields.Count

Open in new window

Regards
0
 
ouestqueAuthor Commented:
Thanks Rgonzo!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.