when i am trying to get create an sheet object,getting the error:
Dim oFS : Set oFS = CreateObject("Scripting.FileSystemObject")
Dim oXls : Set oXls = CreateObject("Excel.Application")
Dim oWb : Set oWb = oXls.Workbooks.Open(oFs.GetAbsolutePathName("Wing_To_Wing_Report.xlsx"))
Dim aData ': aData = oWb.Worksheets(1).Range("$A2:$C10")
Dim dicP : Set dicP = CreateObject("Scripting.Dictionary")
Dim Range,ObSheet1,ObSheet2
Dim TotalRows,LastCol
ObSheet1=oWb.ActiveWorkbook.Worksheets("WingToWingMay25")
ObSheet2=oWb.ActiveWorkbook.Worksheets("ParentChildLink")
Tried this also:
ObSheet1=oWb.Worksheets("WingToWingMay25")
ObSheet2=oWb.Worksheets("ParentChildLink")
Error Object doesn't support this property or method: "ActiveWorkbook"
Can you help me here? why so.