maverick0728
asked on
Excel VBA pass range value
I have the following
However, when I put in "rangevalue" in the call to:
InsertPictureInRange(filen ame, rangevalue)
I get an error:
Compile error:
Expected: =
How should I be passing this?
Sub TestInsertPictureInRange()
Dim filename As String: filename = Cells(1, 11)
Dim rangevalue As Range: Set rangevalue = Range(Cells(1, 12), Cells(1, 13))
InsertPictureInRange(filename, rangevalue)
End Sub
Sub InsertPictureInRange(PictureFileName As String, TargetCells As Range)
End Sub
However, when I put in "rangevalue" in the call to:
InsertPictureInRange(filen
I get an error:
Compile error:
Expected: =
How should I be passing this?
Line 5: InsertPictureInRange filename, rangevalue
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.