LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Paste from clipboard to an Excel table


Dave Patrick wrote:
The code is actually running in an Excel spreadsheet and I'm

opening
another
spreadsheet and wanting to paste the data into an Access table.


I would still use the TransferSpreadsheet Method.


Automate the server application and get it to 'pull' data from the
client? Wrong mental model, methinks. Better to use data access
technology to 'push' data to the client e.g.

Sub Just_Four_Lines()
Dim con As Object
Set con = CreateObject("ADODB.Connection")
con.Open _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=D:\DATA\Access\test.mdb"
con.Execute _
"INSERT INTO tblNames" & _
" SELECT F1, F2, F3 FROM [Excel 8.0;HDR=NO;" & _
"Database=D:\DATA\Excel\SomeWB.xls;].[A1:C3];"
End Sub

Jamie.

--



 
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
Cannot paste between 2 excel spreadsheets w/o office clipboard ope bluecali Excel Discussion (Misc queries) 1 May 11th 07 01:13 PM
unable to copy/paste in excel once clipboard becomes full sengtavanfatsura via OfficeKB.com New Users to Excel 2 May 22nd 06 09:45 PM
how do I paste formulas in excel clipboard? AndyBermuda Excel Discussion (Misc queries) 3 May 27th 05 03:25 PM
How do I paste from clipboard to range using Excel VBA Beesagood Excel Programming 5 October 15th 04 12:10 AM
Paste Clipboard from Word to last row in excel Otto Moehrbach[_3_] Excel Programming 1 July 23rd 03 03:30 PM


All times are GMT +1. The time now is 11:17 AM.

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

About Us

"It's about Microsoft Excel"