|
-
Feb 17th, 2005, 10:32 AM
#1
Thread Starter
New Member
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
-
Feb 17th, 2005, 10:55 AM
#2
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).?
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Feb 17th, 2005, 11:20 AM
#3
Thread Starter
New Member
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
-
Feb 17th, 2005, 11:56 AM
#4
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 17th, 2005, 12:19 PM
#5
Thread Starter
New Member
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
-
Feb 17th, 2005, 12:28 PM
#6
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. 's
Ps, dont forget to Resolve your thread
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
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
|