Hi, can you help me with this code?
I want to load the contents of the file into a text box for editing by the user, but for some reason, the file doesn't show up in the text dialog. Heres what i've got:
Code:
Dim sFile
Dim sA
 'Prompt user for filename
    CD1.DialogTitle = "Secure-It!"
    CD1.Flags = cdlOFNHideReadOnly
    CD1.Filter = "HTML Files|*.htm;*.html|Text Files|*.txt|All files (*.*)|*.*"
    CD1.CancelError = True
    On Error Resume Next
    CD1.ShowOpen
    'Grab filename
    sFile = CD1.FileName
    If Err = 0 Then
    On Error Resume Next
    Open sFile For Random As #1
    Print #1, sA
    Close #1
    End If
    txtCode = sA
    frmMain.Caption = "PageGen Unlimited - " & sFile