LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 740
Default Macro do works in excel...

Hi again,

How to write in this code by
1) making the workbook to be set in Manual Calc. mode, before population of
template sheets,
2)after population of the sheets, return back to Automatic calc mode.

here's the wonderful <guided typical code from Sir Toppers
----------
Sub SetUp()

Dim ws1 As Worksheet, ws2 As Worksheet, ws3 As Worksheet, ws4 As Worksheet
Dim irow As Long, orow As Long
Dim Lastrow As Long

Dim wsname As String

Set ws1 = Worksheets("LIST")
Set ws2 = Worksheets("TEMPLATE")
Set ws3 = Worksheets("CAT")
Set ws4 = Worksheets("DATA")

With ws1

Lastrow = .Cells(Rows.Count, 1).End(xlUp).Row

For irow = 2 To Lastrow
wsname = .Cells(irow, 2)
Sheets("Template").Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = wsname
ActiveSheet.Range("H1") = wsname
.Cells(irow, 33).Formula = "='" & wsname & "'!h54"
.Cells(irow, 34).Formula = "='" & wsname & "'!h53"
.Cells(irow, 35).Formula = "='" & wsname & "'!h52"
.Cells(irow, 36).Formula = "='" & wsname & "'!h51"
.Cells(irow, 37).Formula = "='" & wsname & "'!h50"
.Cells(irow, 38).Formula = "='" & wsname & "'!J9"
.Cells(irow, 39).Formula = "='" & wsname & "'!C53"
.Cells(irow, 40).Formula = "='" & wsname & "'!C52"
.Cells(irow, 41).Formula = "='" & wsname & "'!C51"


Next irow

End With


End Sub
---------

thanks for help,
driller

--
*****
birds of the same feather flock together..

 
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
Email Macro only sometime works? PaulW Excel Discussion (Misc queries) 0 August 15th 06 10:22 AM
Excel macro works only for administrator Free Agent99 Excel Discussion (Misc queries) 12 May 15th 06 09:25 PM
Tab-naming macro only works once :-( Stilla Excel Worksheet Functions 3 February 10th 06 03:09 PM
macro works for some users and doesn't for others Pooja Excel Discussion (Misc queries) 2 October 27th 05 08:27 PM
How do I convert works file to excel without works software? CatMB Excel Discussion (Misc queries) 1 June 21st 05 04:12 PM


All times are GMT +1. The time now is 05:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"