Sub rpt_HTML()
Dim lokasifileTemp As String
Dim namafolderTemp As String
lokasifileTemp = ActiveWorkbook.Path
namafolderTemp = lokasifileTemp & "\rpt_Temp"
If Len(Dir(namafolderTemp, vbDirectory)) = 0 Then
MkDir namafolderTemp
End If
Sheets("Olah Laporan").Select
Dim namawbHTML As String
namasheetHTML = Sheet3.Range("F39").Value
namawbHTML = ActiveWorkbook.Path & "\rpt_Temp\" & Sheet3.Range("F39").Value & "_" & Format(Now, "yymmddhhmmss") & ".htm"
Sheets("Olah Laporan").Copy
Sheets("Olah Laporan").Select
Sheets("Olah Laporan").Name = namasheetHTML
ActiveWorkbook.SaveAs FileName:= _
namawbHTML, FileFormat:=xlHtml, _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWorkbook.Save
ActiveWindow.Close
Dim HyperHTML As String
HyperHTML = namawbHTML
ThisWorkbook.FollowHyperlink address:=HyperHTML ', NewWindow:=True
End Sub
0 komentar:
Posting Komentar