Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What do I have to change in following code to allow macro to paste copied data at cell range selected via
application.msgbox code displayed below MsgBox "From GoTo Box, Select 'Sub Data' To Copy Application.Dialogs(xlDialogFormulaGoto).Sho Selection.Cop MsgBox "From GoTo Box, Select 'GROUP' to Copy Sub Data to Application.Dialogs(xlDialogFormulaGoto).Sho Dim ret_value As Rang Set ret_value = Application.InputBox("select a range in Group", Type:=8 Application.Goto reference:=ret_value ' I added this line of code to display starting cell of range I had selected w/inputbox ActiveCell.Activate ' I added this line of code, hoping it would make cell selected work w/selection paste special ans = MsgBox(" Is this correct cell to enter Sub Score", vbYesNo) If ans = vbNo Then _ Exit Sub ' Above code appears to work, but I receive error msg with following paste special code! Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False The code i am pasting is 4 cell wide ex col a col b col c col sub01 joe blow 50 4 thanks again for your hel Bob Leonar |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your Inputbox is clearing the clipboard! Paste from 'To Copy' to 'Copy to' directly without having to choose a sub-range in betwee
----- rleonard wrote: ---- What do I have to change in following code to allow macro to paste copied data at cell range selected via application.msgbox code displayed below MsgBox "From GoTo Box, Select 'Sub Data' To Copy Application.Dialogs(xlDialogFormulaGoto).Sho Selection.Cop MsgBox "From GoTo Box, Select 'GROUP' to Copy Sub Data to Application.Dialogs(xlDialogFormulaGoto).Sho Dim ret_value As Rang Set ret_value = Application.InputBox("select a range in Group", Type:=8 Application.Goto reference:=ret_value ' I added this line of code to display starting cell of range I had selected w/inputbox ActiveCell.Activate ' I added this line of code, hoping it would make cell selected work w/selection paste special ans = MsgBox(" Is this correct cell to enter Sub Score", vbYesNo) If ans = vbNo Then _ Exit Sub ' Above code appears to work, but I receive error msg with following paste special code! Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False The code i am pasting is 4 cell wide ex col a col b col c col sub01 joe blow 50 4 thanks again for your hel Bob Leonar |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why does Selection.PasteSpecial toggle Application.ScreenUpdating | Excel Worksheet Functions | |||
FindNext problem when using PasteSpecial | Excel Programming | |||
PasteSpecial problem | Excel Programming | |||
PasteSpecial problem | Excel Programming |