+ Reply to Thread
Results 1 to 3 of 3

On click msgbox [need urgently]

  1. #1
    Registered User
    Join Date
    03-01-2012
    Location
    karachi, pakistan
    MS-Off Ver
    Excel 2003
    Posts
    1

    Exclamation On click msgbox [need urgently]

    1) is there any way that when i click a cell in a sheet then a msg box pops open.
    i want to put it in a function/sub

    2) how to pass an array from a function to another function or sub


    Please i want it urgently...

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: On click msgbox [need urgently]

    Right click on the sheet and select View Code. Put this code in
    Please Login or Register  to view this content.
    Explain what you intend to do in your point 2 above.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: On click msgbox [need urgently]

    If you want to for example a msgbox to open in Sheet1 when you click cell A1 then in Sheet 1 place the following code
    Please Login or Register  to view this content.
    Part 2 - pass an array
    Probably need a little more information but as a guide
    Please Login or Register  to view this content.
    The doWork sub populates a 2 dimensional array and passes it to the sub test which prints out in the immediate window the values of the array. Same works with function - just pass the array to the function and the function then does something with the array and returns a value - e.g. add up the values in the array. That is the basics but depending on what you want to do just pass the variable to the function or sub.
    Remember the purpose of a function is to return a value so many times you may not need a function - depends if you need to return a value.
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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