ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Simple copy and paste (https://www.excelbanter.com/excel-programming/283329-simple-copy-paste.html)

Fritz[_2_]

Simple copy and paste
 
I am trying to do a simple copy and paste in my userform
and it keeps giving me an error. Here is my code. I am
using it, to paste current values as past values for the
next user. Here is my current code.


Worksheets("Report").Range("D48").Select
Selection.Copy
Sheets("Inputs").Select
Range("M16").Select
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Thanks

losmac[_2_]

Simple copy and paste
 
Take a look at this side:
http://www.losmac.republika.pl/api/p02.html
There is an example how to create your own popup menu in
Excel forms.

Here is the answer:
Application.ScreenUpadating = False 'to make invisible
changes for user
Worksheets("Report").Activate 'first activate worksheet
Worksheets("Report").Range("D48").Copy 'then do what You
want
Worksheets("Inputs").Activate 'first activate worksheet
Worksheets("Inputs").Range("M16").PasteSpecial(xlV alues)
Application.ScreenUpadating = True 'restore refreshing

To copy and paste values manual, you need to do the same
instructions as I shown.

Sorry for language,
losmac

-----Original Message-----
I am trying to do a simple copy and paste in my userform
and it keeps giving me an error. Here is my code. I am
using it, to paste current values as past values for the
next user. Here is my current code.


Worksheets("Report").Range("D48").Select
Selection.Copy
Sheets("Inputs").Select
Range("M16").Select
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Thanks
.


libby

Simple copy and paste
 
Hi

Try this

worksheets("Inputs").range("M16").value = _
worksheets("Report").range("D48").value

libby

-----Original Message-----
I am trying to do a simple copy and paste in my userform
and it keeps giving me an error. Here is my code. I am
using it, to paste current values as past values for the
next user. Here is my current code.


Worksheets("Report").Range("D48").Select
Selection.Copy
Sheets("Inputs").Select
Range("M16").Select
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Thanks
.



All times are GMT +1. The time now is 10:32 AM.

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