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: 1
Default Calling Programs in other sheets


I'm building a workbook that uses checkboxes to turn pages on or off
(via hiding them). What I want to do is hide the coresponding summary
in the economic overview page when a particular feature is disabled.
However, for whatever reason, I am unable to write a successful program
to do this.

My first instinct was to try something like this:

Private Sub CheckBox1_Click()
Application.ScreenUpdating = False
Call Sheets("overview").special
If CheckBox1 = True Then
Range("a18").Select
Selection.EntireRow.Hidden = False
CommandButton7.Visible = True
SHEETS(\"OVERVIEW\").SELECT
RANGE(\"A66\").SELECT
SELECTION.ENTIREROW.HIDDEN = FALSE
SHEETS(\"SUMMARY\").SELECT
Else
If Worksheets("overview").Range("b58").Value = 0 And
Worksheets("overview").Range("c58").Value = 0 Then
Range("a18").Select
Selection.EntireRow.Hidden = True
CommandButton7.Visible = False
SHEETS(\"OVERVIEW\").SELECT
RANGE(\"A66\").SELECT
SELECTION.ENTIREROW.HIDDEN = FALSE
SHEETS(\"SUMMARY\").SELECT
Else
Application.ScreenUpdating = True
MsgBox ("The object you have choosen to hide contains values and thus
can't be hidden.")
End If
End If
End Sub

That would generate an error during the page switching part of the
code. I figured, alright, whatever you stupid program, I'll just work
around you. So I wrote a seperate program on the other sheet, and
inserted a call program into the code, but that is also generating an
error. Thing about it is though, is I know this can be done because I
can make a program that sends numbers to a range on the other sheet, I
just can't get it to use a true/false value to exicute the program.
Any advice?

Call Sheets("Overview").special(1) - or .special(0)

Sub special(tf)
If tf = 1 Then
Range("a66").Select
Selection.EntireRow.Hidden = False
Else
Range("a66").Select
Selection.EntireRow.Hidden = True
End If
End Sub


--
wilro85
------------------------------------------------------------------------
wilro85's Profile: http://www.excelforum.com/member.php...o&userid=26935
View this thread: http://www.excelforum.com/showthread...hreadid=401576

 
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
calling cells from other sheets and listing louis2112 Excel Programming 3 April 19th 04 04:44 PM
Help! Calling hidden sheets? Arvi Laanemets Excel Programming 0 February 5th 04 07:16 PM
Help! Calling hidden sheets? A.W.J. Ales Excel Programming 0 February 5th 04 07:09 PM
Help! Calling hidden sheets? Ron de Bruin Excel Programming 0 February 5th 04 07:02 PM
Calling sub programs ChuckM[_2_] Excel Programming 2 December 16th 03 05:52 PM


All times are GMT +1. The time now is 12:22 PM.

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"