Hi xrimson77,
Can you please send your code?
Bye
---
Harish
Main Topics
Browse All TopicsI have a COM addin for Excel and it writes values to some cells. When a cell is selected and has the blinking I cursor in it (you can do this by double clicking a cell) and the Addin tries to write to the cell, I get the good old 1004 Application-definied or Object-defined error.
I tried to reproduce the error by wrting a macro that does someting like:
Range("A1").FormulaR1C1 = "Some Value"
but if a cell has an I cursor in it, you can't even run a macro, they are disabled.
So is there some way using VBA to escape the selection so I can write to the cell? Or skip the writing if the cell has an I cursor?
I know I could just select a different cell first, but I don't want the users selection to be lost. I know I could turn screen painting off and select a different cell, then the original cell and turn it back on, but I feel this is a hack and I am looking for another way.... anybody know of one?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Good to hear it is solved.
Since you solved it yourself you might ask for refund and closing this question on:
http://www.experts-exchang
regards,
Jeroen
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:
PAQ with points refunded
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
matthewspatrick
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: roos01Posted on 2005-02-22 at 11:35:11ID: 13375046
is this function called using a button on a sheet? in this case the button could still having the focus.
try to set the focus first on the workbook for instance by range("A1").select
just reading your comments again then if the cell has a blinking cursor then the sheet is in edit mode. if the sheet is in edit mode you first have to get out of edit mode like pressing F2 and then call the macro.
you might even think of using vba to select the cell which makes it go out of edit mode
regards,
jeroen