Wrox Programmer Forums
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 5th, 2004, 12:55 PM
Registered User
Join Date: Jan 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using Private Sub


I'm trying to use a Private sub in my macro, but nothing is going on.
The Macro's code:

Worksheet_SelectionChange (ActiveCell.CurrentRegion)
activesheet.Rows(3).Hidden = True
activesheet.Rows(4).Hidden = True
activesheet.Rows(5).Hidden = True
For i = 3 To 5
If activesheet.Rows(i).Hidden = True Then
    MsgBox (activesheet.Cells(i, 1))
    activesheet.Rows(i).Hidden = False
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    With ActiveWindow
        .ScrollRow = Target.Value
    End With
End Sub

I would like to use my private sub in my sub. If anyone knows how I can do this, please send me an answer with, if possible, an example.

Tks very much.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Private Messages in Forum Antilles128 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 March 19th, 2008 08:19 AM
Please help!!!!!Private Sub Worksheet_Change VicM Excel VBA 1 March 6th, 2008 10:35 PM
Private Key with Associated Certificate bdblhk3 BOOK: Beginning Cryptography with Java 1 October 22nd, 2007 04:32 PM
Private Messages ViagraFalls BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 10 October 22nd, 2007 03:48 PM
private constructor in C# n.nsivakumar C# 1 August 16th, 2006 07:08 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.