Cell selection box in Excel

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ellipsism
    New Member
    • Jan 2008
    • 6

    Cell selection box in Excel

    I'm using an excel sheet to keep track of a number of variable links (a few thousand) in a very large compiled matlab model. I have a python method that checks a variable link to see if it actually exists in the model. I have also been able to loop through all variable links with VBA to verify their validity by calling the python script. However, this takes very long time.

    If I add a new variable link (a string in a cell), I want to be able to press a button, get a cell selection box, choose the cell I want to verify, and run the python script checking-routine on only that string. How can I create a cell selection box?

    I want it to basically have the same functionality as the ones that are used in the built-in Excel advanced filter function: a box comes up and I can use the mouse to mark a region, which data I then can operate on.

    Thanks in advance,
    Johan
  • ubentook
    New Member
    • Dec 2007
    • 58

    #2
    Re: "How can I create a cell selection box?"

    '--
    Sub GetMeSomeCells( )
    Dim vAnswer As Variant
    vAnswer = Application.Inp utBox("Select a Cell.", _
    "Verify String", ActiveCell.Addr ess, , , , , 8)
    If vAnswer = False Then Exit Sub
    MsgBox vAnswer
    End Sub
    '--



    Originally posted by ellipsism
    I'm using an excel sheet to keep track of a number of variable links (a few thousand) in a very large compiled matlab model. I have a python method that checks a variable link to see if it actually exists in the model. I have also been able to loop through all variable links with VBA to verify their validity by calling the python script. However, this takes very long time.

    If I add a new variable link (a string in a cell), I want to be able to press a button, get a cell selection box, choose the cell I want to verify, and run the python script checking-routine on only that string. How can I create a cell selection box?

    I want it to basically have the same functionality as the ones that are used in the built-in Excel advanced filter function: a box comes up and I can use the mouse to mark a region, which data I then can operate on.

    Thanks in advance,
    Johan

    Comment

    • ellipsism
      New Member
      • Jan 2008
      • 6

      #3
      Thanks alot. That is exactly what I wanted!

      best regards,
      Johan

      Comment

      Working...