View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andy Andy is offline
external usenet poster
 
Posts: 10
Default Excel 2002 and 97 compatability



I have written a simple bit of code that works perfectly on my machine
(PC with XP and Excel 2002). When I send it to a friend with Excel 97
he gets a 'runtime 13 error', presumably because he has an older version
of Excel.

Is there anyway of finding out what is causing the problem so that I can
re-code the VBA macro another way?

The code is simply:

Sub Macro1()
For Each blankcell In Range("M2:M10000")
If blankcell.Value < 0 Then
blankcell.Offset(0, 3).Activate
Selection.Resize(1, 38).Select
Selection.SpecialCells(xlCellTypeConstants,2).Sele ct
Selection.Copy
Selection.End(xlToRight).Select
Selection.Offset(0, 1).Activate
ActiveSheet.Paste
Application.CutCopyMode = False
End If
Next blankcell
Columns("P:BB").Select
Selection.EntireColumn.Hidden = True
Range("A2").Select
End Sub



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!