Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I will pull my hairs off if it does not solve..
screenupdating not getting disabled. pleas ehelp Sub Main_Steady() Dim sfile As String, spath As String Dim intflfound As Integer Dim fundgrp As String Application.ScreenUpdating = False sfile = "Steady" i = 6 For sht = 55 To Sheets.Count 'sheets count fundgrp = Sheets(sht).Name spath = "G:\US_IS\Cash_Project\Metrics\Year 2008\" & fundgrp & "\New" With Application.FileSearch .NewSearch .LookIn = spath .Filename = sfile .SearchSubFolders = True .MatchTextExactly = False '.MatchAllWordForms = True .Execute If .FoundFiles.Count = 0 Then ThisWorkbook.Sheets("Reports").Range("b" & i).Value = spath ThisWorkbook.Sheets("Reports").Range("a" & i).Value = fundgrp i = i + 1 Else For intflfound = 1 To .FoundFiles.Count ' found file Workbooks.Open Filename:=(.FoundFiles(intflfound)), UpdateLinks:=0 x = ActiveWorkbook.Name Sheets("Cash Availability").Activate If Run("'" & ActiveWorkbook.Name & "'!Cash_Availability.cash_availability") Then ThisWorkbook.Sheets("Reports").Range("b" & i).Value = spath ThisWorkbook.Sheets("Reports").Range("a" & i).Value = fundgrp i = i + 1 Else For co = 2 To 24 'for all count For ro = 6 To 28 Step 2 'for all count On Error Resume Next ThisWorkbook.Sheets(fundgrp).Cells(ro, co).Value = ThisWorkbook.Sheets(fundgrp).Cells(ro, co).Value + _ ActiveWorkbook.Sheets("Cash Availability").Cells(ro, co).Value Next 'for all count Next 'for all count For ro = 11 To 29 Step 6 'quater count For co = 2 To 24 'quarter count ThisWorkbook.Sheets(fundgrp).Cells(ro, co).Value = ThisWorkbook.Sheets(fundgrp).Cells(ro, co).Value + _ ActiveWorkbook.Sheets("Cash Availability").Cells(ro, co).Value Next 'quarter count Next 'quarter count For ro = 31 To 31 'year count For co = 2 To 24 'year count ThisWorkbook.Sheets(fundgrp).Cells(ro, co).Value = ThisWorkbook.Sheets(fundgrp).Cells(ro, co).Value + _ ActiveWorkbook.Sheets("Cash Availability").Cells(ro, co).Value Next 'yr count Next 'yr count End If Workbooks(x).Close SaveChanges = "No" Next End If End With Next Sheets("reports").Activate End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
why would a excel file sent with data open as grey screen | Excel Discussion (Misc queries) | |||
use hyperlink to open file as front screen | Excel Discussion (Misc queries) | |||
Print multiple files from File Open screen | Excel Programming | |||
File Open dialog box is full-screen...???? | Excel Discussion (Misc queries) | |||
Screen Updating on Open Workbook | Excel Programming |