Sorry, I meant
Function ZoomFactor()
ZoomFactor = Worksheets(Application.Caller.Parent.Name).PageSetup.Zoom
End Function
--
HTH
Bob Phillips
(remove xxx from email address if mailing direct)
Hi,
Thanks for the code. I have one more question.
Is there any way to use that code in a User Defined Function.
thanks in advance...
--
HA
"okaizawa" <
[email protected]>, haber iletisinde ?unlar?
yazd?:
[email protected]...
Hi,
try this:
Sub Test()
Dim vRet As Variant
'FitToPagesWide <-- 1
'FitToPagesTall <-- 1
vRet = ExecuteExcel4Macro("PAGE.SETUP(,,,,,,,,,,,,{1,1})")
'Select the Zoom option
vRet = ExecuteExcel4Macro("PAGE.SETUP(,,,,,,,,,,,,{#N/A,#N/A})")
'Get the Zoom value
MsgBox ActiveSheet.PageSetup.Zoom
'or
'vRet = ExecuteExcel4Macro("GET.DOCUMENT(62)")
End Sub
--
HTH,
okaizawa
Sorry for describing the problem on wrong way...
With ActiveSheet.PageSetup
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
the problem is when fit to pages wide and tall selected from page setup
(as you see in the code), zoom property set to false automatically.