LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating xls file via xml getting Run-time error '1004'


My application is creating an xml file which is about the same format
which is used to create excel file. This xml file is read by a VB
application(whose code I do not have). The VB app creates a xls file
and password protects the same.

The change which I wanted to carry out was:
For one of the cells, I would like the contents to be displayed in the
formula bar, even if the user has opened the excel sheet in the read
only mode (without the password)

If I want to try this out in excel I would need to follow the below
steps
a)Right Click on the cell
b)Format Cells -Protection-Hidden checkbox should be unchecked

As per MS documentation, this can be acheived by making the following
changes in the XML File
1) In the style for that particular cell, we need to put in the
attribute
<Protection x:HideFormula="0" ss:Protected="1"/
2) In the worksheet tag we need to put
<Worksheet ss:Name="Sheet1" ss:Protected="1"
instead of
<Worksheet ss:Name="Sheet1"

Now if I give this modified file to the VB app, it throws up the
following error:

Run-time error '1004': Unable to set the FormulaHidden property of the
Range class

What are the changes I would need to do in XML to resolve this issue.
Please note: I cannot use macros or that kind of stuff due to customer
restrictions.


--
ydnam
------------------------------------------------------------------------
ydnam's Profile: http://www.excelforum.com/member.php...o&userid=33554
View this thread: http://www.excelforum.com/showthread...hreadid=533363

 
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
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Run time error '1004': Generaol ODBC error Dwaine Horton[_3_] Excel Programming 2 April 26th 05 02:52 PM
Run time error 1004 General ODCB Error Kevin Excel Programming 3 February 26th 05 12:51 PM
Application Run Time Error 1004 and Stack Error ExcelMonkey[_190_] Excel Programming 9 February 11th 05 04:48 PM


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

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

About Us

"It's about Microsoft Excel"