By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,035 Members | 1,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,035 IT Pros & Developers. It's quick & easy.

Cell selection box in Excel

P: 6
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
Apr 11 '08 #1
Share this Question
Share on Google+
2 Replies


P: 58
Re: "How can I create a cell selection box?"

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



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
Apr 11 '08 #2

P: 6
Thanks alot. That is exactly what I wanted!

best regards,
Johan
Apr 14 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.