View Single Post
 
Old 07-10-2017, 03:09 PM
cboshdave cboshdave is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Jul 2017
Posts: 3
cboshdave is on a distinguished road
Default Invalid Qualifier Error...

I get that this is a common error. I write these things all the time. I am stumped on this one though.

sBaby is defined as a String.
The variable defines just fine. I just can do a Substring on it for some reason?
It is erroring on the variable in the second line.
Yes, i feel dumb asking... but I have spent too much time trying to figure it out!!!

sBaby1 = oMasterFile.Sheets(1).Cells(r, cBabyId).Value
sBaby1 = sBaby1.Substring(1, iPosition)

Nevermind. I figured it out. Not sure how to delete this posting. Apparently, I just needed to walk away for a bit and come back fresh. I guess VBA did not like Substring.

sBaby1 = Left(sBaby1, iPosition - 1)
Reply With Quote