I am seeking help to try and fix an error that I am getting inside of my excel vba code. I am trying to import the column names of a sql table into an excel worksheet. When I run this code:
[For intCount = 0 To rsmyf.Fields.Co unt
Range("A2").Off set(intCount, 0).Value = rsmyf(intCount) .Name]
I get this error: Run-time error '3265'- Item cannot be found in the collection corresponding to the requested name or ordinal. The error appears here - ".Name"
Can someone tell me what I need to do to fix this?
[For intCount = 0 To rsmyf.Fields.Co unt
Range("A2").Off set(intCount, 0).Value = rsmyf(intCount) .Name]
I get this error: Run-time error '3265'- Item cannot be found in the collection corresponding to the requested name or ordinal. The error appears here - ".Name"
Can someone tell me what I need to do to fix this?
Comment