Results 1 to 6 of 6

macro for save as from .xls to .mthml

Threaded View

  1. #1
    Registered User
    Join Date
    10-07-2011
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    54

    macro for save as from .xls to .mthml

    I would like to create a click button on Userform that allows user to do "save as" the data sheet with certain cells and in .mhtml format.

    I have tried code shown below but it's not working. please if anybody could help for this. Thanks.

    Public Sub SaveAs()
    Const PATH As String = "c:\"
    With ActiveWorkbook
    'Range of the cells that I want to export
    Range("K12:K3054").Select
    .SaveAs FileName:=PATH & _
    'file name and type of file
    .Sheets("Sheet1").Range("A1").Value & ".mthml"
    End With
    End Sub
    Last edited by copythat; 10-30-2011 at 02:15 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1