A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
You need:
set wb=thisworkbook
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have the following vba code which is part of a user defined function, which I am trying to run on my mac:
Function Parent(NodeID As String)
Dim c As Integer
Dim r As Integer
Dim i As Integer
Dim wb As Workbook
Dim ws As Worksheet
wb = ThisWorkbook
ws = wb.Sheets("Hierarchy-Extended")
The function stops at the first line, i.e. "wb = ThisWorkbook" and in the watch window the value for wb becomes <out of context>
Can anyone help?
Thanks
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
You need:
set wb=thisworkbook