473,386 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
Apr 11 '08 #1
2 1561
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
Thanks alot. That is exactly what I wanted!

best regards,
Johan
Apr 14 '08 #3

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

Similar topics

2
by: nivas.meda | last post by:
Hi, I have an excel sheet with a graph and cells.If i change the value in the excel cells the graph will reflect.Now i am going to implement this functionality in html page.I successfully saved...
5
by: nivas.meda | last post by:
Hi, I have an excel sheet with a graph and cells.If i change the value in the excel cells the graph will reflect.Now i am going to implement this functionality in html page.I successfully saved...
8
by: John Brock | last post by:
I am creating an Excel workbook using VB.NET, and have run into a problem. Excel at times insists on reformatting data that I enter into cells, e.g., converting "01234" to "1234", and this screws...
18
by: Frank M. Walter | last post by:
Hello, I have made an small AddIn with udf for excel 2003. I use vs2003. The point of view is the function __T() I call it in excel sheet writing =__T() I am not able to set a value to a...
3
by: afirst | last post by:
Hello. I have just started using macros in Excel- I recorded a simple formula-now I need the macro to work on a number of spreadsheets, regardless of the number of cases the spreadsheet contains ...
6
by: McKirahan | last post by:
I an using ASP to read a database table and generate an HTML table which is save via FSO with a file extension of .xls which opens up in MS-Excel. I am inserting several lines of text into a cell...
16
by: alexia.bee | last post by:
Hi all, In some weird reason, excel instance won;t die if i remove the comment from 4 lines of setting values into struct. here is a snipcode public...
2
by: Brian Parker | last post by:
I need to format text in cell in an Excel worksheet and I need to do this using C#. I've seen code that will set the format for the whole cell, but I just need to format one character in that...
2
by: patrick.waldo | last post by:
Hi all, I am trying to figure out a way to read colors with xlrd, but I did not understand the formatting.py module. Basically, I want to sort rows that are red or green. My initial attempt...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.