Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Need help... My workbook has multiple worksheets. I am trying to create a macro that will display the formula in all the worksheets with 1-step. The following macro don't seems to work. Thanks for your help. Sub ShowFormula() ' ' Display formula instead of value in all worksheets ' Dim Sh As Worksheet ' For Each Sh In ActiveWorkbook.Worksheets ActiveWindow.DisplayFormulas = True Next End Sub -- slc ------------------------------------------------------------------------ slc's Profile: http://www.excelforum.com/member.php...fo&userid=1439 View this thread: http://www.excelforum.com/showthread...hreadid=392786 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() This worked for me. Sub MyDisplayFormula() ActiveWindow.DisplayFormulas = True End Sub Manges -- mangesh_yada ----------------------------------------------------------------------- mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047 View this thread: http://www.excelforum.com/showthread.php?threadid=39278 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() The macro which you described only works for the current activ worksheet but not for the rest of the worksheets in the same workbook -- sl ----------------------------------------------------------------------- slc's Profile: http://www.excelforum.com/member.php...nfo&userid=143 View this thread: http://www.excelforum.com/showthread.php?threadid=39278 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() ok. Use: Private Sub CommandButton1_Click() Application.ScreenUpdating = False shtName = ActiveSheet.Name For Each sht In Worksheets sht.Activate ActiveWindow.DisplayFormulas = True Next Worksheets(shtName).Select Application.ScreenUpdating = True End Sub Mangesh -- mangesh_yadav ------------------------------------------------------------------------ mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470 View this thread: http://www.excelforum.com/showthread...hreadid=392786 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() slc, Here is one i have assigned to a button on my toolbar. It toggles o and off. 'This is macro for showing formulas, toggle off and on. 'Keyboard shortcut is "ctrl and ~" Sub formuladisplaytoggle() If ActiveWindow.DisplayFormulas = False Then ActiveWindow.DisplayFormulas = True Else ActiveWindow.DisplayFormulas = False End If End Sub This help? Dave slc Wrote: Need help... My workbook has multiple worksheets. I am trying to create a macr that will display the formula in all the worksheets with 1-step. Th following macro don't seems to work. Thanks for your help. Sub ShowFormula() ' ' Display formula instead of value in all worksheets ' Dim Sh As Worksheet ' For Each Sh In ActiveWorkbook.Worksheets ActiveWindow.DisplayFormulas = True Next End Su -- Piranh ----------------------------------------------------------------------- Piranha's Profile: http://www.excelforum.com/member.php...fo&userid=2043 View this thread: http://www.excelforum.com/showthread.php?threadid=39278 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi SLC,
Your sub fails because whilst you cycle through the worksheets, the active window remains unchanged. Try: '======================== Public Sub ShowFormula() '\\ Display formula instead of value in all worksheets Dim SH As Worksheet Dim SHcurrent As Worksheet Set SHcurrent = ActiveSheet Application.ScreenUpdating = False For Each SH In ActiveWorkbook.Worksheets SH.Activate ActiveWindow.DisplayFormulas = True Next SHcurrent.Activate Application.ScreenUpdating = True End Sub '<<======================== And, anticipating your next question...: '======================== Public Sub HideFormulas() '\\ Restore value display in all worksheets Dim SH As Worksheet Dim SHcurrent As Worksheet Set SHcurrent = ActiveSheet Application.ScreenUpdating = False For Each SH In ActiveWorkbook.Worksheets SH.Activate ActiveWindow.DisplayFormulas = False Next SHcurrent.Activate Application.ScreenUpdating = True End Sub '<<======================== --- Regards, Norman "slc" wrote in message ... Need help... My workbook has multiple worksheets. I am trying to create a macro that will display the formula in all the worksheets with 1-step. The following macro don't seems to work. Thanks for your help. Sub ShowFormula() ' ' Display formula instead of value in all worksheets ' Dim Sh As Worksheet ' For Each Sh In ActiveWorkbook.Worksheets ActiveWindow.DisplayFormulas = True Next End Sub -- slc ------------------------------------------------------------------------ slc's Profile: http://www.excelforum.com/member.php...fo&userid=1439 View this thread: http://www.excelforum.com/showthread...hreadid=392786 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Mangesh & Piranha, Thanks. I managed to combined both and this works even better for me -- sl ----------------------------------------------------------------------- slc's Profile: http://www.excelforum.com/member.php...nfo&userid=143 View this thread: http://www.excelforum.com/showthread.php?threadid=39278 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() slc, Glad it helped. Dave slc Wrote: Mangesh & Piranha, Thanks. I managed to combined both and this works even better for me -- Piranh ----------------------------------------------------------------------- Piranha's Profile: http://www.excelforum.com/member.php...fo&userid=2043 View this thread: http://www.excelforum.com/showthread.php?threadid=39278 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display 2 worksheets simultaneously | Excel Worksheet Functions | |||
display differences between two worksheets | Excel Worksheet Functions | |||
Worksheets don't display | Setting up and Configuration of Excel | |||
display two rows of worksheets | Excel Worksheet Functions | |||
How do I add data from two worksheets and display on the third Wks | Excel Worksheet Functions |