Auto_Open sub gives errors after upgrade from excel 2000 to 2003
Compile Error, cannot find project or library.
Any help on what's happening here? Code worked in Excel 2000
Thank you
Re: Auto_Open sub gives errors after upgrade from excel 2000 to 2003
It should highlight a line or at least move to it...
Whats on that line...? Is it in the references (F2 for object list)
Do you have all the references in (newer ones for excel objects ofcourse).?
Re: Auto_Open sub gives errors after upgrade from excel 2000 to 2003
Here is the code:
Sub Auto_Open()
a = InputBox("enter file name", "File to Import")
Workbooks.OpenText Filename:= _
a, Origin:=xlWindows, _
StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(0, 1)
Cells.Select
Selection.Cut
Windows("lonestar.xls").Activate
Sheets(1).Select
Range("A1").Select
ActiveSheet.Paste
i = 2
j = 2
k = 2
z = k
b = k
Do Until Cells(i, 1).Value = ""
If Left(Cells(i, 1), 2) = "11" Then
'asked to change on 3/3 by barbara from healthmatics
'Sheets(2).Cells(k, 4).Value = "'" & Mid(Cells(i, 1).Value, 3, 20)
'asked to change on 3/3 by barbara from healthmatics
' added 2/17 per healthmatics request
'Sheets(6).Cells(j + 1, 1).Value = Sheets(2).Cells(k, 4).Value
'end addition
"REMOVED TO SAVE SPACE"-------------------------
--------------------------------------
the a variable in row 2 is highlighted
Re: Auto_Open sub gives errors after upgrade from excel 2000 to 2003
Welcome to the Forums.
Are you writting this in Excels VBA Editor or in VB? It sounds like your missing
a reference. Post what you have listed.
Re: Auto_Open sub gives errors after upgrade from excel 2000 to 2003
figured it out. It was due to an upgrade from 2000 to 2003. There was a iseven code not being recognized had to change it to mod
Re: Auto_Open sub gives errors after upgrade from excel 2000 to 2003
Yes, like I posted, if you upgrade the reference to 2000 will be lost. So you need
to add the new one to 2003. :thumb:'s
Ps, dont forget to Resolve your thread ;)