Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

VBScript: Get data from excel cell and load it into variable

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?

1 Solution

Accepted Solutions
marcus_sommer

The cell-content isn't an object else just a value therefore try it with:

vAverage = XLDoc.Sheets(1).Range("B2").Value

- Marcus

View solution in original post

3 Replies
marcus_sommer

The cell-content isn't an object else just a value therefore try it with:

vAverage = XLDoc.Sheets(1).Range("B2").Value

- Marcus

Anonymous
Not applicable
Author

That's it! Thanks!

Anonymous
Not applicable
Author

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?