vishu Posted July 10, 2010 Share Posted July 10, 2010 Hi All, I would like to know how to read an edit box in the excel file. I have attached the snapshot of the edit box basically am trying to read the row number displayed in the edit box but I couldn't can anyone help? Thanks,Excel Edit box reading.rar Link to comment Share on other sites More sharing options...
jfcby Posted July 10, 2010 Share Posted July 10, 2010 vishu, Try this... WinActivate("Microsoft Excel - Book1") $var = ControlGetText("Microsoft Excel - Book1", "", "Edit1") MsgBox(0, "Excel Namebox Text", $var) I tested it and it reads the Name Box edit field. You can comment out the WinActivate because you really don't need it. jfcby Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB **** Link to comment Share on other sites More sharing options...
vishu Posted July 12, 2010 Author Share Posted July 12, 2010 Hi jfcby , Thanks for the Reply. I had tried your solution even before coming to the Forum, but in vain that did not work. Can you pl tell me if you have any workaround. Thanks, Vishwas Link to comment Share on other sites More sharing options...
enaiman Posted July 12, 2010 Share Posted July 12, 2010 I've tried myself to read that control but the results were not consistent once you change the selected row - sometimes it displayed the old value ... as I said, not a consistent behaviour. Vishu, are you sure you need to know the content of that box? because there might be a workaround. The content will be always the coordinates of the selected cell (or the first in a range of selected cells). Unless you plan to do something with the Excel sheet visible, you don't need that at all. If you'll provide some code you might get better help. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
vishu Posted July 12, 2010 Author Share Posted July 12, 2010 Hi enaiman, Thanks a lot for the reply, but things are working all of a sudden I think God has pityed me :-). Thanks to both u guyz for the wonderful support offered. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now