excel add-in write text

G

Guest

Hi Experts

i am trying to write text on excel sheet ,i am using the following code:

appXl.ActiveCell.Value2 = "Sample Text";

this is working fine when a cell is selected but

its not working when the cell in edit mode.
 
G

Guest

thanks for reying :)
is there any mothod, i can do that ?
any link or example ?

or can you explain me how internally methods are invoking at the time of
editing the cell .
as its working in case of insert---symbol feature of excel
can i invoke that toolbar's command button event to insert the symbol?
 
M

Mike Fogleman

Not in edit mode. While you are editing, the cell contents or value is still
up for grabs, under construction. There has been no commitment to a set
value for the application or code to deal with.
Mike F
 
G

Guest

than how insert--symbol is working in excel?
if its working than there should be some way to do that.
can i invoke insert-symbol -- from my command button
 
N

NickHK

You would do better rethinking your requirements, rather than trying to run
code in edit mode.
AFAIK, the closest you can get is:
Range("A1").Select
SendKeys "{F2}"
SendKeys "{LEFT}"
SendKeys "{LEFT}"
SendKeys "&"

NickHK
 
G

Guest

thanks for reply
i already tried with sendkeys but its for normal characters only.
i wants to send character like :"€" (alt+0128)
its not working in that case its displaying character:"¬"
How i can send character " €" with sendkeys?

thanks again...
 
N

NickHK

Unfortunately these don't work:
SendKeys "%(0128) 'As not the key pad number
SendKeys "(^%e)" 'As it does in Word

If you can arrange for the "?" to be on the clipboard, you can "^v" to paste
it.

Otherwise you may have to add it when edit mode is finished,
_SelectionChange event.
Unless anyone else has bright ideas.

NickHK
 
G

Guest

than how can i send the ^v key to excel?

NickHK said:
Unfortunately these don't work:
SendKeys "%(0128) 'As not the key pad number
SendKeys "(^%e)" 'As it does in Word

If you can arrange for the "?" to be on the clipboard, you can "^v" to paste
it.

Otherwise you may have to add it when edit mode is finished,
_SelectionChange event.
Unless anyone else has bright ideas.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top