Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear users of the news group, I will try my best to describe my problem
I want to write a macro whose NAME is MY_MACRO which will be called after I have selected a certain range in a ExcelSheet, say [B5:D10]. This Macro will have to proceed the data contained in the range. My question is how can I access this range? Is this ActiveRange object? Best regards XS |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub MY_MACRO()
With Selection 'do your stuff End With End Sub -- HTH RP (remove nothere from the email address if mailing direct) wrote in message oups.com... Dear users of the news group, I will try my best to describe my problem I want to write a macro whose NAME is MY_MACRO which will be called after I have selected a certain range in a ExcelSheet, say [B5:D10]. This Macro will have to proceed the data contained in the range. My question is how can I access this range? Is this ActiveRange object? Best regards XS |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
selection
for example If typename(selection) = "Range" then msgbox Selection.Address(external:=True) End If -- Regards, Tom Ogilvy wrote in message oups.com... Dear users of the news group, I will try my best to describe my problem I want to write a macro whose NAME is MY_MACRO which will be called after I have selected a certain range in a ExcelSheet, say [B5:D10]. This Macro will have to proceed the data contained in the range. My question is how can I access this range? Is this ActiveRange object? Best regards XS |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
do you know how can I copy this selected region and paste it exactly as
it is seen to a Outlook application? XS |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ron de Bruin's site
http://www.rondebruin.nl/sendmail.htm -- Regards, Tom Ogilvy wrote in message oups.com... do you know how can I copy this selected region and paste it exactly as it is seen to a Outlook application? XS |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Tom and Bob
Because my Selection is a Range, I would like to have another question: how can I access the left most, top cell of the range, and how can I use RELATIVE reference to access other cells from this top left most cell. Best regards. XS |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Selection.Cells(1,1) is the top-left cell selection.cells(1,1).cells(10,10).select is one example that gets 10 rows, 10 columns off that cell, or Selection.Cells(1,1).Offset(11,11).Select does exactly the same using OFFSET. And finally, here is a neat little trick I saw Tom post a while back selection(selection.count).select which gets the last cell in a selection. -- HTH RP (remove nothere from the email address if mailing direct) wrote in message oups.com... Dear Tom and Bob Because my Selection is a Range, I would like to have another question: how can I access the left most, top cell of the range, and how can I use RELATIVE reference to access other cells from this top left most cell. Best regards. XS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"Select method of Range class failed" Error | Excel Discussion (Misc queries) | |||
How do I select a range of cells without doing Range("a3", "f3").. | Excel Programming | |||
VBA error 1004 "Select method of Range class failed" | Excel Programming | |||
Using "Cells" to write "Range("A:A,H:H").Select" | Excel Programming | |||
Error 1004, "select method of range class failed" | Excel Programming |