Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Calucated Field in a Userform robinsn Excel Discussion (Misc queries) 0 July 24th 10 03:28 PM
how to sort (by one field), copy (based on one field) to another tab,then clear data on original sheet. Mel Excel Programming 3 April 17th 09 09:18 PM
Restriction for the Date Field in UserForm [email protected] Excel Programming 1 May 13th 08 11:03 AM
Dynamic userform field names rsphorler Excel Programming 3 January 9th 08 11:24 PM
fornat UserForm field geebee Excel Programming 2 September 19th 06 11:04 PM


All times are GMT +1. The time now is 07:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"