ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA code translation - compile error (https://www.excelbanter.com/excel-programming/328320-vba-code-translation-compile-error.html)

MaBell

VBA code translation - compile error
 
Hi guys,

I am somewhat knowledgable in VBA but I have never seen this before. Someone
at work needed a fix to an exsisting application and it hasn;t been compiled
in a lwhile. When I compiled it it's giving me this error and there are no
help topics for this. Any ideas?

error message: variable required - can't assign to this expression

Code in error (does not like .Date):
Input #Open_File_Id, Quarterly_ROR_Stream(fx_counter).Date, _
Quarterly_ROR_Stream(fx_counter).Return


And what's a "Return_Stream" variable?

--

Thanks in advance,
Matt
(access 2000)

Bill Renaud[_2_]

VBA code translation - compile error
 
It looks to me like the line of code is attempting to input 2 pieces of data
into 2 different fields of an array or user-defined-type of some sort. The
user-defined-type or array is named "Quarterly_ROR_Stream", the index that
points to a single record (or element) is "fx_counter", and "Date" and
"Return" are 2 different fields. Was "Quarterly_ROR_Stream" originally
defined in another code module that has been deleted for some reason?

Look for help for the Input # statement in Excel (or Access?). (Type "Input
#" in the Answer Wizard input box.)

"Return_Stream" may be the text stream that is returned from the open
sequential file referenced by the "Open_File_Id" file number.
--
Regards,
Bill




All times are GMT +1. The time now is 10:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com