Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML and VB 2

Status
Not open for further replies.

cyberprof

Programmer
Jun 10, 2003
229
GB
I want to include a web page I've developed in my VB program. I know how to use the Internet Controls to link to the htm files, but this file can be edited and change the result of the program.

Is there anyway of using a HTML files and lock it in the VB program so it cannot be deleted or edited.

Thanks

J

 
no problem...

just for fun, here is a smaller version...
Code:
Sub HtmlToFunction2(File As String)
  Dim HtmlLines As String
  Dim fName As String
  If Len(Dir(File)) Then
    Open File For Input As #1
      HtmlLines = Input(LOF(1), #1)
    Close
    With CreateObject("Scripting.FileSystemObject")
      fName = Replace(.GetFileName(File), "." & .GetExtensionName(.GetFileName(File)), "")
      Open Replace(File, "." & .GetExtensionName(.GetFileName(File)), "") & ".sub" For Output As #1
        Print #1, "Function " & fName & "()" & vbCrLf & "  Dim Temp As String" & vbCrLf & "  Temp = Temp & """ & _
                  Replace(HtmlLines, vbCrLf, """ & vbCrLf" & vbCrLf & "  Temp = Temp & """) & _
                  """ & vbCrLf" & vbCrLf & "  " & fName & " = Temp" & vbCrLf & "End Function" & vbCrLf
      Close
    End With
  End If
End Sub


PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top