Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default selection.pastespecial problem

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default selection.pastespecial problem

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does Selection.PasteSpecial toggle Application.ScreenUpdating OssieMac Excel Worksheet Functions 2 August 4th 09 12:05 AM
FindNext problem when using PasteSpecial Glyn Baker Excel Programming 1 December 6th 03 08:40 PM
PasteSpecial problem Dave Peterson[_3_] Excel Programming 2 November 6th 03 02:45 AM
PasteSpecial problem Jim Rech Excel Programming 0 November 4th 03 04:47 PM


All times are GMT +1. The time now is 03:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"