Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to use data a user saved in the clipboard
prior to running my macro. Or, is there a way to prompt the user to select a range of data to copy to the clipboard. I attempted to use the InputBox Method with a Type:=8 setting but I get an error when I attempt to set the return value to a variable which I declared as being of type Range, and then try to select that range. The specific error I get is "Run-Time error '1004' Method 'Range' of object '_Global' failed. ------------------------ Dim Data_Copy_Range As Range Set Data_Copy_Range = Application.InputBox(prompt:="Enter copy range.", Type:=8) Range(Data_Copy_Range).Select ------------------------ Please Help? Phil |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Take a look at Chip Pearson's article
http://www.cpearson.com/excel/clipboar.htm Steve "Phil" wrote in message ... Is there a way to use data a user saved in the clipboard prior to running my macro. Or, is there a way to prompt the user to select a range of data to copy to the clipboard. I attempted to use the InputBox Method with a Type:=8 setting but I get an error when I attempt to set the return value to a variable which I declared as being of type Range, and then try to select that range. The specific error I get is "Run-Time error '1004' Method 'Range' of object '_Global' failed. ------------------------ Dim Data_Copy_Range As Range Set Data_Copy_Range = Application.InputBox(prompt:="Enter copy range.", Type:=8) Range(Data_Copy_Range).Select ------------------------ Please Help? Phil |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You object variable Data_Copy_Range points to the chosen range, so the
line of code should be: Data_Copy_Range.Select Note Chip Pearson's excellent code to which Steve refers is for copying text rather than an Excel Range to the clipboard, so isn't appropriate here. "Steve Yandl" wrote in message ... Take a look at Chip Pearson's article http://www.cpearson.com/excel/clipboar.htm Steve "Phil" wrote in message ... Is there a way to use data a user saved in the clipboard prior to running my macro. Or, is there a way to prompt the user to select a range of data to copy to the clipboard. I attempted to use the InputBox Method with a Type:=8 setting but I get an error when I attempt to set the return value to a variable which I declared as being of type Range, and then try to select that range. The specific error I get is "Run-Time error '1004' Method 'Range' of object '_Global' failed. ------------------------ Dim Data_Copy_Range As Range Set Data_Copy_Range = Application.InputBox(prompt:="Enter copy range.", Type:=8) Range(Data_Copy_Range).Select ------------------------ Please Help? Phil |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can't paste from clipboard in my macro | Excel Discussion (Misc queries) | |||
Macro to check if clipboard is blank. | Excel Discussion (Misc queries) | |||
use macro to set auto( about clipboard ) | Excel Discussion (Misc queries) | |||
macro to respond to clipboard prompt? | Excel Programming | |||
Disable Clipboard Dialog Box during Macro | Excel Programming |