+ Reply to Thread
Results 1 to 5 of 5

Why is mydestination empty when I select the cell in an input box?

  1. #1
    Registered User
    Join Date
    11-28-2019
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2016
    Posts
    2

    Why is mydestination empty when I select the cell in an input box?

    Hi,

    I am having a problem with a private sub in a user form. The sub is meant to take a selected table using a refedit and assign it to an array. Then it is meant to send the array to another destination using an inputBox type=8. The problem is, when I run it, nothing happens, and when I debug it, mydestination is empty.

    Where am I going wrong? Please find the code below.

    Thanks

    Owen

    Please Login or Register  to view this content.

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,610

    Re: Why is mydestination empty when I select the cell in an input box?

    When I run this and select A1 my msgbox returns $A$1.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    16,222

    Re: Why is mydestination empty when I select the cell in an input box?

    If you attach your actual file we can run your code. Also it would answer all my questions below.

    When you say nothing happens, do you mean absolutely nothing, or does the form close?

    What is the name of the form containing this code?

    What is RefEdit1? How does its value get set?

    What is ActiWorkBook.Text? How does its value get set?
    Making the world a better place one fret at a time | | |會 |會 |會 |會 | |:| | |會 |會
    Please read the rules
    If someone helped you, click on the star icon at the bottom of their post
    If your problem is solved, go to Thread Tools and select Mark This Thread Solved
    Don't attach a screenshot--just attach your Excel file! It's easier and will let us experiment with your data, formulas, and code.

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    UK
    MS-Off Ver
    2016 primarily
    Posts
    4,453

    Re: Why is mydestination empty when I select the cell in an input box?

    It looks like your Else block could be simplified to:

    Please Login or Register  to view this content.
    Rory
    Yea though I walk through the valley of the shadow of death, at least it's a change of scenery

  5. #5
    Registered User
    Join Date
    11-28-2019
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2016
    Posts
    2

    Re: Why is mydestination empty when I select the cell in an input box?

    Thank you Rorya this solves the problem.

    Much appreciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Restrict Input to Next Empty Cell
    By uniopp in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-24-2015, 07:16 PM
  2. [SOLVED] input prompt if cell is empty
    By Burt_100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-04-2014, 05:55 PM
  3. I need my userform to input data in the first empty cell of a row
    By msmitherc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-14-2014, 07:09 PM
  4. [SOLVED] input date column A, increment B, select blank cell in D and input time. in a macro
    By jeffstu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2012, 11:19 AM
  5. how to generate error message for an empty cell (mandatory input cell)
    By asankar24 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-20-2012, 12:37 PM
  6. Select first empty cell
    By logan_fernandes in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-18-2009, 02:23 PM
  7. Select the next empty cell
    By Tibbs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2007, 12:14 PM

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