LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default VBA Code works in 2000 not 97

Hi All,

I have written the following code in the appropriate sheet object so that
when the user changes an entry in cell E21 the code is executed. It works
fine with Excel 2000 but not Excel 97. Unfortunately the workbook is to be
distributed on a network on which all users have Excel 97 !

The value in cell E21 is data validated using the list method.

By a process of elimination it appears the data validation is causing the
problem because if l remove the data validation and enter "Headcount"
manually the code executes.

Does anybody have any ideas on how to overcome the problem in Excel 97 ?

All suggestions gratefully received.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

If Target.Address = "$E$21" Then
If Range("E21").Value = "Headcount" Then
Range("M26:M60").Select
Selection.Copy
Range("E26").Select
Selection.PasteSpecial Paste:=xlValues
Range("C4").Select
Application.CutCopyMode = False
Else
Range("E26:E60").Select
Selection.ClearContents
Range("C4").Select
End If
End If

Regards

Michael Beckinsale


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfer Works 2000 .wks files to Excel 2007 walkshaw Excel Discussion (Misc queries) 1 April 23rd 09 10:05 AM
#VALUE! error: vlookup works in Excel 2000 but not 2003 Nick Ersdown Excel Discussion (Misc queries) 6 November 25th 05 12:23 PM
Is there a template that works automatically like in Word 2000? Stephany A Excel Discussion (Misc queries) 1 August 13th 05 12:13 PM
MS Works Spreadsheet 2000 v5.0 VLOOKUP John L. Excel Worksheet Functions 1 August 7th 05 08:05 PM
Save As... MS Works 2000 spreadsheet Thomas Excel Discussion (Misc queries) 2 May 7th 05 06:56 PM


All times are GMT +1. The time now is 08:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"