LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Referring to file no's from within an add-in gives problems

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
referring to sheet in another file Tami Excel Worksheet Functions 1 May 31st 08 04:33 PM
referring to a sheet in another file Tami Excel Worksheet Functions 1 May 31st 08 01:56 PM
Referring to a variable file name Brettjg Excel Discussion (Misc queries) 4 March 3rd 07 11:18 AM
Problems merging an excel file due to code or file problems? Cindy M -WordMVP- Excel Programming 0 September 14th 04 02:58 PM
Problems with referring to workbooks Matt Lawson Excel Programming 1 February 21st 04 04:26 PM


All times are GMT +1. The time now is 10:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"