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: 510
Default Excel2000 procedure in Excel2007

Hi

I have a workbook designed in Excel2000, where visibility of some seets is
controlled by Change event of SetUp sheet. In Excel2000 it works OK, but
when I open the file in Excel2007 (it's first time I have used any version
of Excel higher than 2000 so long), then there are no errors returned by
VBA, but whenever the Visible property for seet is recalculated, the
property remains unchanged. And when a cell value on sheet is changed by
code, this value remains unchanged too. The code is he
--------
Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Column = 3 And (Target.Row = 2 Or Target.Row = 3) Then
If Sheets("SetUp").Range("MyMode") = "SingleLabel" Then
Sheets("SetUp").Range("MyFormat") = "A5"
End If
Sheets("Shipments").Visible = (Sheets("SetUp").Range("MyMode") =
"MultiLabel")
Sheets("MultiLabelA4").Visible = (Sheets("SetUp").Range("MyMode") =
"MultiLabel" And Sheets("SetUp").Range("MyFormat") = "A4")
Sheets("MultiLabelA5").Visible = (Sheets("SetUp").Range("MyMode") =
"MultiLabel" And Sheets("SetUp").Range("MyFormat") = "A5")
Sheets("SingleLabelA5").Visible = (Sheets("SetUp").Range("MyMode") =
"SingleLabel")
End If

End Sub
---------


P.e. I have SetUp!MyFormat="A4" and SetUp!MyMode="Multilabel". When I change
SetUp!MyMode="SingleLabel", in Excel2000 SetuUp!MyFormat is changed to "A5",
sheet SingleLabelA5 is made visible, and sheet Shipments and MultilabelA4
are made invisible. In Excel 2007 nothing happens. When i debug the code
step-by-step in Excel2007, I see, that p.e. the expression
(Sheets("SetUp").Range("MyMode") = "MultiLabel")
returns False, but Sheets("Shipments").Visible remains hidden, etc.

The macro security for Excel2007 is set to low at moment (it is medium for
Excel2000)


Thanks in advance for any help.

--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


 
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
I had menus of Macros in Excel2000 ... where in Excel2007?? StumblingAround Excel Discussion (Misc queries) 2 December 27th 09 06:56 PM
Excel2007 David Lee Stewart Excel Discussion (Misc queries) 4 July 24th 09 10:07 PM
How to jump from a Form procedure to a Workbook or Module procedure? T. Erkson Excel Programming 4 January 25th 07 07:15 PM
Excel2000 VBA: How force the procedure to wait until queries are refreshed? Arvi Laanemets Excel Programming 2 June 16th 05 09:01 PM


All times are GMT +1. The time now is 01:13 AM.

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

About Us

"It's about Microsoft Excel"