Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code where I open a workbook, copy page and close
workbook. Excel is "locking up" (hourglass) at close workbook line. I have used this same code in other applications with no problem. Any ideas? Sheets("Directory").Select Yr = Cells(2, 2) Mth = Cells(4, 2) Location = Cells(7, 2) CAFile = Cells(8, 2) ctpage = Cells(9, 2) CTup = Cells(14, 2) Dim bk As Workbook Set bk = Workbooks.Open(Location & Yr & "\" & Mth & "\" & CAFile, UpdateLinks:=False) Dim wbkSource As Workbook Dim wbkDestination As Workbook Dim wksSource As Worksheet Dim wksDestination As Worksheet Dim rngSource As Range Dim rngDestination As Range Set wbkSource = Workbooks(CAFile) Set wksSource = wbkSource.Sheets(ctpage) Set rngSource = wksSource.Cells Set wbkDestination = ThisWorkbook Set wksDestination = wbkDestination.Sheets(CTup) Set rngDestination = wksDestination.Range("A1") rngSource.Copy rngDestination.PasteSpecial (xlPasteValues) Windows(CAFile).Activate Application.DisplayAlerts = False ActiveWorkbook.Close SaveChanges:=False Application.DisplayAlerts = True |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help on Workbook close and workbook save events | Excel Programming | |||
Before Close workbook? | Excel Programming | |||
close only one workbook | New Users to Excel | |||
workbook.close savechanges:=True problem | Excel Programming | |||
Close a the current workbook and load another specified workbook | Excel Programming |