paste data from a workbook on a userform spreadsheet

A

Alberto Ast

I tried the following I pull from an old post I found

Private Sub CommandButton1_Click()

'Eg2: by copyoing from the source workbook and pasting to the
' spreadsheet on the userform
ThisWorkbook.Worksheets(1).Range("A1:a10").Copy
Spreadsheet1.Range("A1").Paste

End Sub

but my macro fail on the last line... Jusst to test I tried to replace

Spreadsheet1.Range("A1").Paste by Spreadsheet1.Range("A1").Select

but if fail same way.. I can not access my userform screadsheet to populate
it.
I post a similar question yesterday but I does not show on my posts so I do
not know if somebody saw it.

I tried following too which I got in a previous post but fail too

Set Dest = UserForm1.Spreadsheet1.Range("a1") <----- FAILS HERE
Sheets("sheet1").Range("A1:B2").Copy
Dest.Paste

Hope I can get some help.... I have spend few days into this with no luck.
 
C

Charles

I tried the following I pull from an old post I found

Private Sub CommandButton1_Click()

    'Eg2: by copyoing from the source workbook and pasting to the
    '   spreadsheet on the userform
    ThisWorkbook.Worksheets(1).Range("A1:a10").Copy
    Spreadsheet1.Range("A1").Paste

End Sub

but my macro fail on the last line... Jusst to test I tried to replace

    Spreadsheet1.Range("A1").Paste by Spreadsheet1.Range("A1").Select

but if fail same way.. I can not access my userform screadsheet to populate
it.
I post a similar question yesterday but I does not show on my posts so I do
not know if somebody saw it.

I tried following too which I got in a previous post but fail too

Set Dest = UserForm1.Spreadsheet1.Range("a1")   <----- FAILS HERE
Sheets("sheet1").Range("A1:B2").Copy
Dest.Paste

Hope I can get some help.... I have spend few days into this with no luck..

Hi,

Check this site, it may help. Also be sure you have internet security
if you down load.
http://software.allfaq.org/forums/t/168482.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top