Hi
I am trying to open an excel sheet from MS Access and using UNION to copy some columns. Here is the code
Dim App As Excel.Application
Dim rng As Excel.Range
Set App = New Excel.Application
App.Visible = True
App.Workbooks.Open CurrentProject.Path & "\Oracle_11i_Access_Request_Approvers.xlsx"
App.Workbooks.Open CurrentProject.Path & "\Approval_Details.xlsx"
Set rng = App.Union(App.ActiveSheet.Range("A:A"), App.ActiveSheet.Range("F:F"))
It gives me the following error in the last line
"Object variable or With block variable not set"
Regards
Murthy
I am trying to open an excel sheet from MS Access and using UNION to copy some columns. Here is the code
Dim App As Excel.Application
Dim rng As Excel.Range
Set App = New Excel.Application
App.Visible = True
App.Workbooks.Open CurrentProject.Path & "\Oracle_11i_Access_Request_Approvers.xlsx"
App.Workbooks.Open CurrentProject.Path & "\Approval_Details.xlsx"
Set rng = App.Union(App.ActiveSheet.Range("A:A"), App.ActiveSheet.Range("F:F"))
It gives me the following error in the last line
"Object variable or With block variable not set"
Regards
Murthy