First of all, Congratulations to Darrell! Glad you got it to work.
Second of all, Hi Rolf:
If you take a look at the Objects in Word (using the Object Browser), you can reference each of the Headers and Footers separately, then save them individually as the Header.htm and Footer.htm files as...
OK Darrell:
In the source code you provided above...
ActiveWorkbook.PublishObjects.Add( _
SourceType:=xlSourceSheet,
Filename:="C:\Inetpub\wwwroot\Plant\Metrics\ScheduleAccomplishment.htm", _
Sheet:="2003 Schedule Accomplishment", _
Title:="Schedule...
Darrell:
OK...Here's another thought for why you're receiving the error...
If your worksheet or workbook is protected...You will get the error you mentioned. If this is what's causing your issue, you have at least a couple of choices.
[li]If possible, unprotect the entire Workbook or...
Darrell:
I copied your code and pasted into Excel.
As long as my capitalization, and spaces were identical to what was referenced in the spreadsheet, I had no problems whatsoever in running the example.
If the Worksheet Name was different in any way from what is referenced in code, I got...
My guess is that your Worksheet Name isn't "sheetname". It's probably "Sheet1" or something else. That will hose it every time.
Just make sure you enter the correct name for the sheet you are referencing, or use the numeric equivalent for the Worksheet item in the...
Darrell:
Not only can you get down to converting certain worksheets into HTML, but you can even define ranges (as small as one cell) and use the "Publish" method as in the following Microsoft example...
ActiveWorkbook.PublishObjects.Add( _
SourceType:=xlSourceRange, _...
No problem, Darrell...
Just add Application.DisplayAlerts = False before you do your "SaveAs" and then add Application.DisplayAlerts = True just before you close the workbook.
-Galen
(DoubleG123)
Try referencing the chart in VBA module using Charts("Chart1").SeriesCollection(1).Points(1). to reference the collection of points and then apply the formatting to the options after .Points(1)..
You can find referenc to this by looking up "Points Collection Object" in Excel.
I put all of the code into VBA macros for the templates I used. The Workbook_Open() event was where I put the call to reference a separate module to automate everything including ThisWorkbook.Close, after everything was done. By putting it into a separate module and calling it from the...
Hi Darrell:
There are a few options at your disposal; however, I have used a particular solution that provided good results similar to what I believe you are seeking...
You can set up the Excel spreadsheet to automatically convert itself to HTML upon closing the workbook and save itself to the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.