+ Reply to Thread
Results 1 to 11 of 11

Shapes object events?

Hybrid View

  1. #1
    Registered User
    Join Date
    11-02-2004
    Location
    Slovenia, LJ
    MS-Off Ver
    2007
    Posts
    40

    Shapes object events?

    Can I write event procedures at shapes object level? How?
    Dr.Ile

  2. #2
    Forum Contributor
    Join Date
    01-10-2006
    Location
    Ahmedabad, India
    MS-Off Ver
    Office 2000
    Posts
    346

    Re:Shapes object events?

    Yes you can have mouse_click event associated with a shape object. Once you have a shape ( picture, drawing object, clipart etc ) on the sheet, right click on the shape, choose " Assign Macro " and then assign any procedure to this shape. This procedure will execute when you click on the shape.

    A V Veerkar

  3. #3
    Registered User
    Join Date
    11-02-2004
    Location
    Slovenia, LJ
    MS-Off Ver
    2007
    Posts
    40
    Thank you avveerkar,
    Any suggestions if I have n lines (n>20 and is changing)?

  4. #4
    Forum Contributor
    Join Date
    01-10-2006
    Location
    Ahmedabad, India
    MS-Off Ver
    Office 2000
    Posts
    346
    Quote Originally Posted by Dr.Ile
    Thank you avveerkar,
    Any suggestions if I have n lines (n>20 and is changing)?
    Sorry, I don't understand your question. 20 lines of what? Associating mouse_click event to a shape would not depend on any line count. You will need to define your problem again.

    A V Veerkar

  5. #5
    Registered User
    Join Date
    11-02-2004
    Location
    Slovenia, LJ
    MS-Off Ver
    2007
    Posts
    40
    Sorry for nontrasparent question. I'll try in a different way:
    At the beggining of my procedure I don't know how many lines there will be. I get their number from running specific procedure. So, number of lines is dependent of my input in this specific procedure. Because of these dependenties I want write a procoderu who will first read the number of lines and then assign them event procedures or macros (your way).
    Thank you
    PS:Sorry for my language

  6. #6
    Forum Contributor
    Join Date
    01-10-2006
    Location
    Ahmedabad, India
    MS-Off Ver
    Office 2000
    Posts
    346
    Quote Originally Posted by Dr.Ile
    Sorry for nontrasparent question. I'll try in a different way:
    At the beggining of my procedure I don't know how many lines there will be. I get their number from running specific procedure. So, number of lines is dependent of my input in this specific procedure. Because of these dependenties I want write a procoderu who will first read the number of lines and then assign them event procedures or macros (your way).
    Thank you
    PS:Sorry for my language
    I am again sorry, I am still not with you. By number of lines do you mean number of used rows in a worksheet? Or you are referring to number of lines of code of your procedure? If it is later case then I do not know what exactly you are referring to because I cannot visualise a situation where number of code lines can change. In the former case, are you saying that the number of rows used is not fixed and you want to write a procedure to first find out how many rows are used and once you know the number then you want to evluate those rows? There is a method called CurrentRegion which will return a used range and then using Rows.Count you could find out number rows in the range. Is that what you are looking for? Else you need to tell me what exactly is your application. Sorry for being such thick-headed.

    A V Veerkar

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1