|
-
Feb 15th, 2001, 10:47 AM
#1
Thread Starter
Junior Member
I have this code and it is comming back with an error
fla$ = "c:\reports\weekly.rpt"
open fla$ of input as #1
width #1, 140
print #1,"weekly report"
close #1
i am getting an error message on the width line
can you please help
thanks
dave
-
Feb 15th, 2001, 10:49 AM
#2
Hyperactive Member
On your line that reads open fla$ of input as #1, replace the of with for.
-
Feb 15th, 2001, 10:51 AM
#3
Lively Member
Try "For Input..." instead of "OF"
Steph
Virtually Impossible !
VB5 Entreprise (SP3) - VB6 Entreprise (SP4), MSSQL7, MSAccess, VBA, VBScript, ASP
-
Feb 15th, 2001, 10:52 AM
#4
i think the file has to be open for output.
-
Feb 15th, 2001, 10:53 AM
#5
Im sure thats a typo guys, or else it would have errored on that line..not the width line
-
Feb 15th, 2001, 10:59 AM
#6
Lively Member
Cander's right, it should be for output according to MSDN, ... sorry about the typo but it was to easy !...
Steph
Virtually Impossible !
VB5 Entreprise (SP3) - VB6 Entreprise (SP4), MSSQL7, MSAccess, VBA, VBScript, ASP
-
Feb 15th, 2001, 11:03 AM
#7
Thread Starter
Junior Member
sorry guys yes that is a type error. th code is
open fla$ for output as #1
width #1, 140
the error is invalid use of property.
please help
-
Feb 15th, 2001, 11:30 AM
#8
Microsoft KnowledgeBase article Q145678 confirms that this is a problem when the code you are trying to use is in a form and the example given in MSDN also doesn't work. However the problem only occurs if the code is in a form, so if you move it to a module or class it will work (I tried it).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|