Hi - on some machines, I am getting "run time error 1004". We are all on Microsoft XP Pro 2002. And all running Excel 2007.
I have had the users edit their macro security settings to "Enable all macros" and "Trust access to VBA project object model".
I am stumped. Thanks in advance for your help.
Error is on the following line:
Selection.ListObject.QueryTable.Refresh
+++++++++++++++++++++++++++++++++++++++++++++++++
code:
++++++++++++++++++++++++++++++++++++++++++++++++++
Sub QryUpdateRegion()
'Author: Thoeum Chor 5/11/2011
'Updates Market and Project_Status queries based on Region selected
Application.ScreenUpdating = False
Worksheets("Values1").Visible = True
Sheets("Values1").Select
Range("M1").Select
Selection.ListObject.QueryTable.Refresh
Range("W1").Select
Selection.ListObject.QueryTable.Refresh
Sheets("CASPR Upload Request").Select
Range("B10").Select
Worksheets("Values1").Visible = False
Application.ScreenUpdating = True
End Sub
I have had the users edit their macro security settings to "Enable all macros" and "Trust access to VBA project object model".
I am stumped. Thanks in advance for your help.
Error is on the following line:
Selection.ListObject.QueryTable.Refresh
+++++++++++++++++++++++++++++++++++++++++++++++++
code:
++++++++++++++++++++++++++++++++++++++++++++++++++
Sub QryUpdateRegion()
'Author: Thoeum Chor 5/11/2011
'Updates Market and Project_Status queries based on Region selected
Application.ScreenUpdating = False
Worksheets("Values1").Visible = True
Sheets("Values1").Select
Range("M1").Select
Selection.ListObject.QueryTable.Refresh
Range("W1").Select
Selection.ListObject.QueryTable.Refresh
Sheets("CASPR Upload Request").Select
Range("B10").Select
Worksheets("Values1").Visible = False
Application.ScreenUpdating = True
End Sub