Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a action for a defined object

hello
first of all my apologizes for allways posting questions instead o
solutions, but I m still too beginner in programming.

I create a macro that format a range . Is it possible to "give" th
range the power to call it. Letīs say it is possible what i want to d
is have the abillity to call it just like:

range("myrange").mymacro

I know it sounds silly but..

thank you in advance

Adri

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Creating a action for a defined object

No you can't do that, but you can pass the range to the macro, like

Call myMacro(Range("A1:A10")

....

Sub myMacro(Rng As Range)

Msgbox rng.Address

End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Adrix " wrote in message
...
hello
first of all my apologizes for allways posting questions instead of
solutions, but I m still too beginner in programming.

I create a macro that format a range . Is it possible to "give" the
range the power to call it. Letīs say it is possible what i want to do
is have the abillity to call it just like:

range("myrange").mymacro

I know it sounds silly but..

thank you in advance

Adrix


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a action for a defined object

thank you any way.

ps- And it is possible to define a new obejct capable to do a ne
action?

thank

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Creating a action for a defined object

Do you mean such as adding a button to a sheet?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Adrix " wrote in message
...
thank you any way.

ps- And it is possible to define a new obejct capable to do a new
action?

thanks


---
Message posted from http://www.ExcelForum.com/



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
Run-time error '50290': Application-defined or object-defined erro Macro button Excel Discussion (Misc queries) 1 March 12th 09 10:59 AM
Application Defined or object defined error ExcelMonkey[_93_] Excel Programming 5 March 2nd 04 11:53 PM
Application-defined or object-defined error Sharon[_5_] Excel Programming 2 October 24th 03 03:49 PM
1004 App - defined or object-defined error Stan Plumber Excel Programming 2 October 2nd 03 01:52 AM
Application-defined or object-defined error Meihua Liang Excel Programming 0 September 8th 03 07:25 PM


All times are GMT +1. The time now is 08:36 AM.

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

About Us

"It's about Microsoft Excel"