Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2008

Tip: Looking for answers? Try searching our database.

Why doesnt this work

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
steve - 03 Mar 2008 00:11 GMT
Dear All,

Can you have a look at this and please tell why it doesnt work

Sub CopySheetAsHTML()

Dim fName As String
Dim wks As Worksheet

Set wks = ActiveSheet
fName = wks.Range("J4").Value

With ActiveWorkbook.PublishObjects.Add(xlSourceSheet, _
   "I:\" & fName & ".htm", wks.Name, "DataRange", _
       xlHtmlStatic, wks.Range("J4").Value)
   .Publish (True)
End With
End Sub

Many Thanks in advance

Steve
JP - 03 Mar 2008 16:52 GMT
Where to start?

1. Do you have this code in a standard Excel module?
2. Do you have a worksheet (not a chart sheet) activated? If so, is
there anything in cell J4? If so, what?
3. Do you have an I: drive?
4. Is the workbook saved?
5. Is "DataRange" referring to anything?

HTH,
JP

> Dear All,
>
[quoted text clipped - 18 lines]
>
> Steve

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.