Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've got several Excel-files that contain sheets and code modules, bu
because there's a lot of code that is copied to all the excel files I'm now working on a main file that contains the general data to b used by all the other Excel files I've created an add-in that contains a function HTML_Header tha should write some text to a text file. In the main code I say Dim iFileNum As Intege iFileNum = FreeFil Open "C:\test.html" For Output As #iFileNu Call HTML_Header(iFileNum and in the function HTML_Header these are the very first two lines o code [code:1:3f6bc40692]Print #iFile, "<html Print #iFile, " <head [/code:1:3f6bc40692 When I try to run this code, the first Print-statement in th HTML_Header function gives error 52 "Bad file name or number". Doe anybody know why I get this error? If I copy the function to th normal Excel-workbook, everything works fine |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
referring to sheet in another file | Excel Worksheet Functions | |||
referring to a sheet in another file | Excel Worksheet Functions | |||
Referring to a variable file name | Excel Discussion (Misc queries) | |||
Problems merging an excel file due to code or file problems? | Excel Programming | |||
Problems with referring to workbooks | Excel Programming |