ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Edit Excel TextBox using C# (https://www.excelbanter.com/excel-programming/311812-edit-excel-textbox-using-c.html)

manish

Edit Excel TextBox using C#
 
Hi,

I would like to edit a Excel TextBox using C#. I have done the selection
using the following code:
((Excel.Shape)xa.ActiveWorkbook.ActiveSheet).Selec t("txtViews");

Next I want to edit the text in the TextBox. How do I do that? Any help
would be highly appreciated.

Thanks,
Manish

Vic Eldridge

Edit Excel TextBox using C#
 
I'm not sure about C#, but in VB we'd use

ActiveWorkbook.ActiveSheet.Shapes("txtViews").Text Frame.Characters.Text = "abc"


Regards,
Vic Eldridge



Manish wrote in message ...
Hi,

I would like to edit a Excel TextBox using C#. I have done the selection
using the following code:
((Excel.Shape)xa.ActiveWorkbook.ActiveSheet).Selec t("txtViews");

Next I want to edit the text in the TextBox. How do I do that? Any help
would be highly appreciated.

Thanks,
Manish



All times are GMT +1. The time now is 12:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com