Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 5th, 2004, 12:55 PM
Registered User
 
Join Date: Jan 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using Private Sub

Hi

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
Next
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.


Cutovoi

Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


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



All times are GMT -4. The time now is 04:32 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.