Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
why!?
hi everyon
i´m trying to get this commandbutton (that is in sheets(1)) to work Private Sub botao_m1_Click( Application.ScreenUpdating = Fals Sheets(4).Selec Range("K15").Selec Selection.Cop Range("M15").Selec Selection.PasteSpecial Paste:=xlPasteValue etc.. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
why!?
Rui,
Because the code is in the sheet's code module, you must prefix the Range objects with the sheet name if the range is not in the sheet containing the code. Sheets(4).Select Sheets(4).Range("K15").Select Selection.Copy Sheets(4).Range("M15").Select Selection.PasteSpecial Paste:=xlPasteValues -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Rui" wrote in message ... hi everyone i´m trying to get this commandbutton (that is in sheets(1)) to work: Private Sub botao_m1_Click() Application.ScreenUpdating = False Sheets(4).Select Range("K15").Select Selection.Copy Range("M15").Select Selection.PasteSpecial Paste:=xlPasteValues etc.. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
why!?
I recommend going about this differeently.
Worksheets(4).Cells(15, 13).Value = _ Worksheets(4).Cells(15, 11).Value This will work and be much faster than what you are currently trying to do. - Pikus --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
why!?
thanks, Chip.
that's it |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
why!?
What do you get?
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Rui" wrote in message ... hi everyone i´m trying to get this commandbutton (that is in sheets(1)) to work: Private Sub botao_m1_Click() Application.ScreenUpdating = False Sheets(4).Select Range("K15").Select Selection.Copy Range("M15").Select Selection.PasteSpecial Paste:=xlPasteValues etc.. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|