This code -
Set varRange = oSheet.Range(Cells(66, 5), Cells(69, 5))
returns the error, "Microsoft VBScript runtime error: Type mismatch:'Cells'"
If I add the dots -
Set varRange = oSheet.Range(.Cells(66, 5), .Cells(69, 5))
it returns the error, "Microsoft VBScript runtime error: Invalid or unqualified reference.
What am I missing? I need to use the cells property to pass the worksheet range as a variable.
Randy Carr
randy.carr@carteretcraven.ncemcs.com
Set varRange = oSheet.Range(Cells(66, 5), Cells(69, 5))
returns the error, "Microsoft VBScript runtime error: Type mismatch:'Cells'"
If I add the dots -
Set varRange = oSheet.Range(.Cells(66, 5), .Cells(69, 5))
it returns the error, "Microsoft VBScript runtime error: Invalid or unqualified reference.
What am I missing? I need to use the cells property to pass the worksheet range as a variable.
Randy Carr
randy.carr@carteretcraven.ncemcs.com