Excel VBA from Excel 97 to Excel 2000 errors

B

Ben Harshbarger

I created a search Macro on Excel 97 at work. When I took
tried to use it on my home computer, Excel 2000 seemed to
not be able to understand the same Macro language and
would therefore halt the Macro. Does anyone have an idea
of what I would need to change for Excel 200 to understand
my Excel 97 Macro?
Thanks!
-Ben Harshbarger
 
J

Jon Peltier

Ben -

Post the code and someone might recognize a problem.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
B

Benjamine Harshbarger

Here is the code in EXCEL VBA. I get a debug compile error on the
"After:=[d1]" stating the Library could not be found

Private Sub cmdLoad_Click()
Dim LastColumn As Integer
Dim LastRow As Long
Dim LastCell As Range

Range("$d$500").End(xlUp).Select
If WorksheetFunction.CountA(Cells) > 0 Then

'''''Search for any entry, by searching backwards byColumns.
LastColumn = Cells.Find(What:="*", After:=[d1], _
SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious).Column

End If
ActiveCell.Copy
Terr1Lbl1.Caption = ActiveCell



I also get a similar error stating the Library could not be found with
the following code from a Class module for the form resizer. the error
points to the Ucase reference

'Check if we can perform the adjustment (i.e. widths and heights can't
be -ve)
For Each oCtl In moForm.Controls
With oCtl
sTag = UCase(.Tag)
 
J

Jamie Collins

Here is the code in EXCEL VBA. I get a debug compile error on the
"After:=[d1]" stating the Library could not be found

I also get a similar error stating the Library could not be found with
the following code from a Class module for the form resizer. the error
points to the Ucase reference

These are symptomatic of a missing reference (VBE, Tools, References).

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top