I appreciate your comments. Let me explain this application from the start.
I have a desktop icon that launches a batch file which opens Access and an Access macro that displays a "beginning date" and "ending date" form with a prompt. This is a one click operation. The user enters the desired dates and hits "continue". (the present database starts in 2005) After hitting "continue", Access runs three separate queries, closes Access and opens the Excel Template with some formatting on it and three separate macro buttons. The user then clicks on one of these buttons which imports desired report (result of the query for the desired dates) into the Excel template. From there, the user can save the data to a standard Excel file.
All this works fine. But, if after importing the data the user hits any of the macro buttons again, I get a runtime error. They are not supposed to do that but hey, stuff happens. That is why I want to hide these buttons after the data is imported. I have pasted the code below that imports one of the queried tables.
Range("A1").Select
With ActiveSheet.ListObjects.Add(SourceType:=0, Source:=Array( _
"OLEDB;Provider=Microsoft.ACE.OLEDB.12.0;Password="""";User ID=Admin;Data Source=C:\Users\Barry-DTW7\Desktop\Data Collection\PlantData.md" _
, _
"b;Mode=Share Deny Write;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB

atabase Passwo" _
, _
"rd="""";Jet OLEDB:Engine Type=5;Jet OLEDB

atabase Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transa" _
, _
"ctions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB

o" _
, _
"n't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex Da" _
, "ta=False;Jet OLEDB:Bypass UserInfo Validation=False"), Destination:=Range( _
"$A$1")).QueryTable
.CommandType = xlCmdTable
.CommandText = Array("Data Between Dates")
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.SourceDataFile = _
"C:\Users\Barry-DTW7\Desktop\Data Collection\PlantData.mdb"
.ListObject.DisplayName = "Table_PlantData"
.Refresh BackgroundQuery:=False
End With
Columns("A:A").Select
Selection.NumberFormat = "m/d/yyyy"
Range("C37").Select
End Sub