Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to get a value from a cell in Excel that I calculate with a formula and then load the said value into a variable, to be used further down into the macro.
I've tried with: set vAverage = XLDoc.Sheets(1).Range("B2").Value but I get an "Object required: 'XLDoc.Sheets(...).Range(...).Value' " error. Any help?
The cell-content isn't an object else just a value therefore try it with:
vAverage = XLDoc.Sheets(1).Range("B2").Value
- Marcus
The cell-content isn't an object else just a value therefore try it with:
vAverage = XLDoc.Sheets(1).Range("B2").Value
- Marcus
That's it! Thanks!
Please help me!
I'm having the same problem.
But I do not not how to replace the "XLDOC"
What is "XLDOC" here? Is this the path where the Excel file located?