Results 1 to 2 of 2

Thread: common dialog control

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    16

    Question

    ok useing the common dialog control how would i open a html file to a webbrowser window and also how would i save the html file if it were changed useing the common dialog save option?

    Thanks

  2. #2
    Guest
    Code:
    'Open
    CommonDialog1.CancelError = True
    'CommonDialog1.Flags = (whatever flags you want)
    On Error GoTo ErrHandler
    CommonDialog1.Filter = "HTM Files (*.htm)|*.htm|All Files (*.*)|*.*|"
    CommonDialog1.FilterIndex = 1
    CommonDialog1.ShowOpen
    Open CommonDialog1.filename For Input As #1
    Text1.Text = Input$(LOF(1), 1)
    Close #1
    Exit Sub
    ErrHandler:
    'End Sub
    
    'Save
    CommonDialog1.CancelError = True
    On Error GoTo ErrHandler
    'CommonDialog1.Flags = (whatever flags you want)
    CommonDialog1.Filter = "HTM Files (*.htm)|*.htm|All Files (*.*)|*.*|"
    CommonDialog1.FilterIndex = 1
    CommonDialog1.ShowSave
    Open CommonDialog1.filename For Output As #1
    Print #1, Text1
    Close #1
    Exit Sub
    ErrHandler:
    'End Sub

Posting Permissions

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



Click Here to Expand Forum to Full Width