+ Reply to Thread
Results 1 to 2 of 2

hook into worksheet events temporarily?

  1. #1
    Alex Popescu
    Guest

    hook into worksheet events temporarily?

    Hi everybody

    I would like to write a wizard function similar to excel ones where once the
    function is started, I can pick up a range by switching to the worksheet and
    get the user selected range.

    My problem is how do I hook up into the worksheet events (ie
    SelectionChange) only while the function is running? If the technical aspect
    of this is too complicated, would anybody know of a good Microsoft or web
    article?

    The way I am planning to go about it is to create a user form with all the
    processing in the background and somehow hook into the worksheet events.

    Any help would be very much appreciated!!!

    Many thanks
    alex



  2. #2
    Philip
    Guest

    RE: hook into worksheet events temporarily?

    You can use the inputbox function with option 8 like this:

    Dim rngSelection As Range
    Set rngSelection = Application.InputBox( _
    Prompt:="Please select a range.", _
    Type:=8)

    this puts a range as the
    HTH

    Philip

    "Alex Popescu" wrote:

    > Hi everybody
    >
    > I would like to write a wizard function similar to excel ones where once the
    > function is started, I can pick up a range by switching to the worksheet and
    > get the user selected range.
    >
    > My problem is how do I hook up into the worksheet events (ie
    > SelectionChange) only while the function is running? If the technical aspect
    > of this is too complicated, would anybody know of a good Microsoft or web
    > article?
    >
    > The way I am planning to go about it is to create a user form with all the
    > processing in the background and somehow hook into the worksheet events.
    >
    > Any help would be very much appreciated!!!
    >
    > Many thanks
    > alex
    >
    >
    >


+ 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