rishicool786
New Member
- Joined
- May 12, 2017
- Messages
- 2
Hi Guys,
I want to run a piece of code for all the worksheets in the workbook. this code is an API which calls functions.
Code I am using is below.
Dim rngData As Range
Dim EPMObject As New FPMXLClient.EPMAddInAutomation
Dim WS As Worksheet
Dim Name As String
For Each WS In ActiveWorkbook.Worksheets
Name = WS
' In variable Name capturing Worksheet name and pass it to API
Set rngData = Range(EPMObject.GetDataTopLeftCell(Name, "000") & ":" & EPMObject.GetDataBottomRightCell(Name, "000"))
Next WS
but i am getting error as Name is not recognizable with API.
Please help me in finding what exactly can be passed in place of Name.
In place of Name
I want to run a piece of code for all the worksheets in the workbook. this code is an API which calls functions.
Code I am using is below.
Dim rngData As Range
Dim EPMObject As New FPMXLClient.EPMAddInAutomation
Dim WS As Worksheet
Dim Name As String
For Each WS In ActiveWorkbook.Worksheets
Name = WS
' In variable Name capturing Worksheet name and pass it to API
Set rngData = Range(EPMObject.GetDataTopLeftCell(Name, "000") & ":" & EPMObject.GetDataBottomRightCell(Name, "000"))
Next WS
but i am getting error as Name is not recognizable with API.
Please help me in finding what exactly can be passed in place of Name.
In place of Name