Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
USING FIELD DATA FROM USERFORM
HI all.
I am tring to use the content of the "location" filed on the Userform1 to populate a string of data ( see code below.) what am I doing wrong? With ActiveSheet.QueryTables.Add(Connection:=Array( _ "OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password=" """;User ID=Admin;Data Source= Userform1.location & NEW.xls;Mode=Share Deny Write;Extended Properties=""" _ , _ "HDR=YES;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=35;Jet OL" _ , _ "EDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Pass" _ , _ "word="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet" _ , " OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"), _ Destination:=Range("A1")) .CommandType = xlCmdTable .CommandText = Array("Sheet1$") .Name = "NEW" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .PreserveColumnInfo = True .SourceDataFile = Userform1.location & "NEW.xls" .Refresh BackgroundQuery:=False |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create Calucated Field in a Userform | Excel Discussion (Misc queries) | |||
how to sort (by one field), copy (based on one field) to another tab,then clear data on original sheet. | Excel Programming | |||
Restriction for the Date Field in UserForm | Excel Programming | |||
Dynamic userform field names | Excel Programming | |||
fornat UserForm field | Excel Programming |