ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   paste data from a workbook on a userform spreadsheet (https://www.excelbanter.com/excel-programming/439286-paste-data-workbook-userform-spreadsheet.html)

Alberto Ast[_2_]

paste data from a workbook on a userform spreadsheet
 
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.




JLGWhiz[_2_]

paste data from a workbook on a userform spreadsheet
 
What is a UserForm Spreadsheet?


"Alberto Ast" wrote in message
...
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.






Charles

paste data from a workbook on a userform spreadsheet
 
On Feb 6, 12:26*pm, Alberto Ast
wrote:
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



All times are GMT +1. The time now is 04:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com