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: 159
Default function question??

Can a function call another function? Here is the function I have. I am tring
to apply a page break (which works fine) then tring to call my format page
funtion after it applies the page break??

Sub setPage()
Dim iRow As Long
Dim myCell As Range
Dim myRng As Range
Dim wks As Worksheet
Dim searchFor As String

searchFor = FrmCreate.CbxDept.Text
Set wks = Worksheets(searchFor)
With wks
.ResetAllPageBreaks
Set myRng = Nothing
On Error Resume Next
Set myRng = .Range("a1", .Cells(.Rows.Count, "A").End(xlUp))
On Error GoTo 0

If myRng Is Nothing Then
MsgBox "No visible cells!"
Exit Sub
End If

iRow = 0
For Each myCell In myRng.Cells
iRow = iRow + 1
If iRow 1 Then
If iRow Mod 19 = 1 Then
.HPageBreaks.Add befo=myCell
Call FormatHeaders
End If
End If
Next myCell
End With

End Sub
 
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
IF function question scubadiver Excel Worksheet Functions 2 September 8th 08 11:37 AM
User Function Question: Collect Condition in Dialog Box - But How toInsert into Function Equation? SteveM Excel Programming 1 January 3rd 08 03:45 PM
Function Question Rubix Excel Worksheet Functions 5 February 7th 06 01:55 AM
Question Regarding Name Function Tom Ogilvy Excel Programming 0 December 4th 03 02:54 PM
Help: Question Regarding Name Function Dustin Schofield Excel Programming 0 December 4th 03 02:16 PM


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