Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to tell a user no range has been selected.
hi
that would depend on what you call selecting. i assume that you want more than 1 cell selected.....so..... If Selection.Cells.Count = 1 Then MsgBox("you have selected only 1 cell. need more. process terminated.") Exit Sub End If Selection.CopyPicture...etc..etc you may have to decide how much is enough????? i see a some gray here ie what is "entire area". regards FSt1 "StargateFan" wrote: I selected an area on the screen and then did a record macro. Here's what I obtained as a script: Sub CopyQuotefallToBitmap() ' Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture End Sub Is there a way for Excel to detect when no range has been selected and to advise the user they need to select a range (always starting at B4, though entire area after that can differ somewhat) and then the script can proceed to the rest of the "Selection.CopyPicture..." scripts above after that? Thanks! :oD |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to tell a user no range has been selected.
I selected an area on the screen and then did a record macro. Here's
what I obtained as a script: Sub CopyQuotefallToBitmap() ' Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture End Sub Is there a way for Excel to detect when no range has been selected and to advise the user they need to select a range (always starting at B4, though entire area after that can differ somewhat) and then the script can proceed to the rest of the "Selection.CopyPicture..." scripts above after that? Thanks! :oD |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to tell a user no range has been selected.
if typename(selection) < "Range" Then Msgbox "Select Range"
"StargateFan" wrote in message ... |I selected an area on the screen and then did a record macro. Here's | what I obtained as a script: | | Sub CopyQuotefallToBitmap() | ' | Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture | End Sub | | Is there a way for Excel to detect when no range has been selected and | to advise the user they need to select a range (always starting at B4, | though entire area after that can differ somewhat) and then the script | can proceed to the rest of the "Selection.CopyPicture..." scripts | above after that? | | Thanks! :oD | |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to tell a user no range has been selected.
On Mon, 3 Aug 2009 20:48:01 -0700, FSt1
wrote: hi that would depend on what you call selecting. i assume that you want more than 1 cell selected.....so..... If Selection.Cells.Count = 1 Then MsgBox("you have selected only 1 cell. need more. process terminated.") Exit Sub End If Selection.CopyPicture...etc..etc you may have to decide how much is enough????? i see a some gray here ie what is "entire area". regards FSt1 Yeah, that'll work. As long as not just the active cell is selected that should be enough. Thanks. I'll give it a try. "StargateFan" wrote: I selected an area on the screen and then did a record macro. Here's what I obtained as a script: Sub CopyQuotefallToBitmap() ' Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture End Sub Is there a way for Excel to detect when no range has been selected and to advise the user they need to select a range (always starting at B4, though entire area after that can differ somewhat) and then the script can proceed to the rest of the "Selection.CopyPicture..." scripts above after that? Thanks! :oD |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to: User selected range? | Excel Programming | |||
Get user selected range into RefEdit | Excel Programming | |||
Referring to a user-selected range | Excel Programming | |||
Identify User Selected Range | Excel Programming | |||
Identify Range Selected By User | Excel Programming |