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: 24
Default help! Why my code can't work in excel 97

Hi

I need some assistance, why my code which i create in excel 2003 can't
run in
excel 97?

General work flow of my code.

I have a raw worksheet containing my raw data & a summary worksheet
which i want to show the information for a vol number. The user will
select from a drop down list the vol number in the summary worksheet.
The vol number is unique.

My code is working in excel 2003, but when i open it in excel 97, i
can't get the output which i want when i select a unique vol number
from the drop down list.

My code

Option Explicit
Sub Worksheet_Activate()
Dim LRow As Long
Dim rng As Range
Dim rng2 As Range
Dim ws As Worksheet

Set ws = Worksheets("raw")
Set rng2 = Range("B3")
LRow = ws.Cells(Rows.count, 3).End(xlUp).Row

' Set rng = ws.Range("C2:C" & LRow)
Set rng = ws.Range("B2:B" & LRow)

'rng.Name = "cid"
rng.Name = "volser"

With rng2.Validation
.Add Type:=xlValidateList, Formula1:="=volser"
End With

End Sub

Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 3 And Target.Column = 2 Then
'calculate criteria cell in case calculation mode is manual
Worksheets("summary").Range("B3").Calculate

Worksheets("raw").Range("data") _
.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("summary").Range("B2:B3"), _
CopyToRange:=Range("A10:DD10"), Unique:=False

End If
End Sub

Thank you

 
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
Can't get bar code font to work in EXCEL 2003 Tony Excel Discussion (Misc queries) 3 December 5th 09 06:19 PM
VBA Code works in Excel 2003 but won't work in Excel 2000 aglazer Excel Programming 2 September 5th 05 03:52 PM
VBA Code works in Excel 2003 but won't work in Excel 2000 [email protected] Excel Programming 0 September 5th 05 09:05 AM
My VBA code in excel does not work on another PC SMH Excel Programming 2 May 28th 05 07:18 PM
CommandBar code does NOT work if Excel is Already Open :( sbriscoe Excel Programming 5 July 30th 04 03:33 AM


All times are GMT +1. The time now is 12:31 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"