+ Reply to Thread
Results 1 to 3 of 3

reference to a range of cells as input for a macro

  1. #1
    Registered User
    Join Date
    05-13-2009
    Location
    Rome
    MS-Off Ver
    Excel 2003
    Posts
    10

    reference to a range of cells as input for a macro

    Hello

    I would like to ask you if you know some way to accomplish this.

    I want to create a macro which asks some information like functions do. For example, I would like the macro to ask for some data to be filled by the user. For that purpose I thought about using the inputBox vba function. I wanna fill the field in the inputBox with a reference to a range from an excel sheet. So, I click on a cell and then I try to hold ctrl + down cursor to get all the range starting from that cell on until the last consecutive filled cell on the sheet. Nonetheless, the problem I have is that when I do ctrl+down cursor, I just do not get the reference I want, because it seems that the ctrl+down cursor combination does not work in the inputbox for filling a reference to a range of cells. Does anyone know some workaround to achieve this?

    Thanks a lot.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: reference to a range of cells as input for a macro

    Without posting what you've used it's hard to comment in truth... are you using Application.InputBox, ie along the lines of:

    Please Login or Register  to view this content.
    I found that the keyboard short-cuts worked ok for me...

  3. #3
    Registered User
    Join Date
    05-13-2009
    Location
    Rome
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: reference to a range of cells as input for a macro

    Quote Originally Posted by DonkeyOte View Post
    Without posting what you've used it's hard to comment in truth... are you using Application.InputBox, ie along the lines of:

    Please Login or Register  to view this content.
    I found that the keyboard short-cuts worked ok for me...
    Thanks, I already solved it though, by setting the button property to TakeFocusOnClick to False in the button which was launching the macro.

+ 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