The Visual Basic gives a "Bad Filename or Number" error...
Usualy this happens when we open a file that is already open, and i think it's not the case!
Here is my code... I expect that someome can help me...
Public Sub ScanFonteFicheiro(Ficheiro As String,dirdestino As String)
Dim FichSaidaHtm, NomeFichTmp, NomeFichHtm, inline, Path, Ficheirocls As String
Dim Decresce, totalchar, FichNum As Integer
Dim infile As Byte
infile = FreeFile
Path = Ficheiro
totalchar = Len(Path)
Decresce = totalchar - 3
NomeFichTmp = Left(Ficheiro, Decresce)
NomeFichHtm = NomeFichTmp & "htm"
FichSaidaHtm = dirdestino & "\" & NomeFichHtm
MsgBox NomeFichHtm
'Open Ficheiro For Input As #infile
Open FichSaidaHtm For Append As #2
FichNum = 1
Print #2, "<html>"
Print #2, "<head>"
Print #2, "<title>" & Ficheirocls & "</title>"
Print #2, "<link rel = 'stylesheet' href = ' Print #2, "</head>"
Print #2, "<body class = 'FixedLeft'>"
Close #2
While Not EOF(Ficheiro)
DeclaracaoPublica inline, FichNum
'Close #infile
'
Wend
End Sub
If anyone can give me an help i will tkx ;-)
Usualy this happens when we open a file that is already open, and i think it's not the case!
Here is my code... I expect that someome can help me...
Public Sub ScanFonteFicheiro(Ficheiro As String,dirdestino As String)
Dim FichSaidaHtm, NomeFichTmp, NomeFichHtm, inline, Path, Ficheirocls As String
Dim Decresce, totalchar, FichNum As Integer
Dim infile As Byte
infile = FreeFile
Path = Ficheiro
totalchar = Len(Path)
Decresce = totalchar - 3
NomeFichTmp = Left(Ficheiro, Decresce)
NomeFichHtm = NomeFichTmp & "htm"
FichSaidaHtm = dirdestino & "\" & NomeFichHtm
MsgBox NomeFichHtm
'Open Ficheiro For Input As #infile
Open FichSaidaHtm For Append As #2
FichNum = 1
Print #2, "<html>"
Print #2, "<head>"
Print #2, "<title>" & Ficheirocls & "</title>"
Print #2, "<link rel = 'stylesheet' href = ' Print #2, "</head>"
Print #2, "<body class = 'FixedLeft'>"
Close #2
While Not EOF(Ficheiro)
DeclaracaoPublica inline, FichNum
'Close #infile
'
Wend
End Sub
If anyone can give me an help i will tkx ;-)