Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-21-2012, 06:54 AM
shabbaranks shabbaranks is offline Exporting workbook specific sheet columns on exit Windows 7 64bit Exporting workbook specific sheet columns on exit Office 2007
Advanced Beginner
Exporting workbook specific sheet columns on exit
 
Join Date: Mar 2011
Posts: 89
shabbaranks is on a distinguished road
Default

Changed the code to

Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Dim wkbk1, wkbk2 As Workbook, wksheet1, wksheet2 As Worksheet, intIndex As Integer
'set the source workbook
    Set wkbk1 = Application.Workbooks("Trial1.xlsm")
'set the source worksheet
..................
And now it works when I shut Excel down
Reply With Quote
  #2  
Old 08-21-2012, 08:00 AM
Venky62 Venky62 is offline Exporting workbook specific sheet columns on exit Windows 7 64bit Exporting workbook specific sheet columns on exit Office 2010 32bit
Advanced Beginner
 
Join Date: Jul 2012
Posts: 58
Venky62 is on a distinguished road
Default

Excellent. Happy to help.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
sheet 2 data highlight in sheet 1 gsrikanth Excel 1 04-21-2012 06:25 PM
how to go 75 sheet gsrikanth Excel 5 01-17-2012 11:24 PM
Adding columns in specific rows only mhays Excel 5 01-17-2012 09:13 AM
Exporting workbook specific sheet columns on exit Construct a summary sheet by summing up from one or more than one sheet. PRADEEPB270 Excel 1 11-04-2011 03:46 AM
copy cell from sheet 2 to sheet 3 macro slipperyjim Excel Programming 1 02-18-2010 01:31 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:48 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft