Input Box Help
I am trying to build a user imput box that will ask the user for the table
name within the data base that I have selected from the code below. I need the user to be able to view the tables in the database and then either select it or enter into the input box. the defualt path and database will always be the same. the table names will change. Sub GetUsageReport() With ActiveSheet.QueryTables.Add(Connection:=Array( _ "OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password=" """;User ID=Admin;Data Source=C:\Scc\db\db1.mdb;Mode=Share Deny Write;Extended Properti" _ , _ "es="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB:D" _ , _ "atabase Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=" _ , _ """"";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLED" _ , "B:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"), Destination:= _ Range("A1")) .CommandType = xlCmdTable .CommandText = Array("UsageReport1") .Name = "db1" .SourceDataFile = "C:\Scc\db\db1.mdb" .Refresh BackgroundQuery:=False End With End Sub -- Thank you in advance for any help you can offer Jim |
All times are GMT +1. The time now is 11:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com