Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Excel 2000 and TextBoxes

I am using Excel 2000 and C#. I am able to open an Excel file, copy it
to a new file (based on user properties), and modify/add data to the
various worksheets. What I am stuck on is being able to change the text
for a text box defined within the Workbook.

I have tried many different variations and I always get the following
error: "Error: Exception from HRESULT: 0x800A03EC".

The code I am using is:

objExcelWS = (Interop.Excel.Worksheet)
objExcelWB.Worksheets[strSheetName];

objExcelWS.Unprotect(SHEET_PASSWORD);
Interop.Excel.TextBox objTxtBox = (Interop.Excel.TextBox)
objExcelWS.TextBoxes(strTextBoxName);


Has anybody experienced this problem? Any solutions?

Thanks in advance...

Giulio.

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Excel 2000 and TextBoxes

Guilo,

Are you sure the text boxes are from the Drawing toolbar, or are
the from the (ActiveX) Controls toolbar?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Giulio Cifelli" wrote in message
...
I am using Excel 2000 and C#. I am able to open an Excel file,

copy it
to a new file (based on user properties), and modify/add data

to the
various worksheets. What I am stuck on is being able to change

the text
for a text box defined within the Workbook.

I have tried many different variations and I always get the

following
error: "Error: Exception from HRESULT: 0x800A03EC".

The code I am using is:

objExcelWS = (Interop.Excel.Worksheet)
objExcelWB.Worksheets[strSheetName];

objExcelWS.Unprotect(SHEET_PASSWORD);
Interop.Excel.TextBox objTxtBox = (Interop.Excel.TextBox)
objExcelWS.TextBoxes(strTextBoxName);


Has anybody experienced this problem? Any solutions?

Thanks in advance...

Giulio.

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Excel 2000 and TextBoxes


The text boxes (buttons and labels as well for that matter) are defined
within the Worksheet. This is a higly interactive Excel workbook with
lots of macros. When launched standalone, it is an application in
itself. What I am trying to do is to change the labels of some of the
text boxes and buttons based on the data that is being outputted from
the C# program that I am writing.

Thanks,

Giulio.

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Excel 2000 and TextBoxes

Excel has two sets of controls which can be used on worksheets.
First, those from the Forms and Drawing toolbars, and, second,
those from the Controls toolbar. Which controls are you using on
the worksheet? The methods for accessing a control depends on
which type (Forms command bar or Controls command bar) the
control happens to be. I don't know C#, but the access methods
will be different for the two types.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Giulio Cifelli" wrote in message
...

The text boxes (buttons and labels as well for that matter) are

defined
within the Worksheet. This is a higly interactive Excel

workbook with
lots of macros. When launched standalone, it is an application

in
itself. What I am trying to do is to change the labels of some

of the
text boxes and buttons based on the data that is being

outputted from
the C# program that I am writing.

Thanks,

Giulio.

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Excel 2000 and TextBoxes


Chip,

The worksheet is using the controls from the Forms toolbar.

Thanks,

Giulio.




*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Excel 2000 and TextBoxes


I am still having the problem... could somebody help.

Thanks in advance,

Giulio.


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
unknown textboxes in excel 2007 ALNIOS ANOGIS Excel Discussion (Misc queries) 1 September 8th 09 04:54 PM
I cannot edit cell format in Excel 2000 (Part of office 2000)! Brett Excel Discussion (Misc queries) 1 April 12th 06 05:58 PM
Hyperlink in Excel 2000 can't open bookmarked Word 2000 file DCheslock Excel Discussion (Misc queries) 1 May 5th 05 10:46 PM
Code-signing certificate problems in Excel 2000 with Windows 2000 Aaron Queenan Excel Programming 0 May 6th 04 11:35 AM
Excel Textboxes Cade09 Excel Programming 1 November 21st 03 05:17 PM


All times are GMT +1. The time now is 01:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"