+ Reply to Thread
Results 1 to 5 of 5

Troubles with application.inputbox

  1. #1
    Registered User
    Join Date
    05-23-2007
    Posts
    9

    Troubles with application.inputbox

    I'm new to this, but there seems to a problem (may be me ;-).
    Is there anybody out there that knows what's wrong?
    Try the following (paste it in your VBA-editor window):
    -----------------------------
    Please Login or Register  to view this content.
    'do I have to activate a sheet before I select cells on it?
    'I thought maybe the select-method would call 'activate' implicitly?
    'why can't I do worksheets("blad3").range(myRange.address).select without 'first activating "blad3"?

    ---------------------------
    The goal would be to be able to select cells on any worksheet and make reference to those cells easily. But I found that neither the range-mode nor the string-mode of the application.inputbox-method solved it for me. I even tried with globals and events trying to catch the clicks from the user, but as you probably already know - the event workbook.sheetactivate isn't fired while making input to the application.inputbox. How would you solve this?

    Thanks!
    Uffe
    Last edited by VBA Noob; 05-23-2007 at 01:32 PM.

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    I think the easily way to fix your problem is to use a RefEdit component in a Userform.

    Regards,
    Antonio

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Hi, Uffe. If you would like to keep the Application.InputBox, here is an alternative that finds the sheet name and range:
    Please Login or Register  to view this content.
    HTH

    Jason
    Last edited by jasoncw; 05-23-2007 at 11:27 AM.

  4. #4
    Registered User
    Join Date
    05-23-2007
    Posts
    9
    Quote Originally Posted by jasoncw
    Hi, Uffe. If you would like to keep the Application.InputBox, here is an alternative that finds the sheet name and range:
    HTH

    Jason
    Thanks Jason!

    That really did the trick! Hats off!

    Where can I find a REAL VBA language reference (all the objects and methods - the works)? I bought 'Excel 2003 Power Programming' by J. Walkenbach and 'Excel VBA macro programming' by Richard Shepherd, and though they are both quiet good books in their own special way, none of them is a language reference. Know where to prompt me?

    Thanks again!
    Uffe

  5. #5
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Glad I could help, Uffe.

    Sorry, I can't help with the book. The only references I have used are the 2003 Power Programming book and various online forums (and of course the Excel/VBA help menus).

    Jason

+ 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