Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-11-2019, 08:35 PM
Khwaja Khwaja is offline Closing & Opening Files Windows 10 Closing & Opening Files Office 2016
Novice
Closing & Opening Files
 
Join Date: Aug 2018
Posts: 12
Khwaja is on a distinguished road
Default Closing & Opening Files

I am using the following code to create a duplicate of an active file and then close the active file. But I am struggling to open the file I just created. Will appreciate some hand holding.





Code:
Sub Copy()
Dim strFilename As String
strFilename = ActiveWorkbook.Path & "" & "GJCT Roster Week " & Range("sWeekNo") + 1 & " WS " & Range("sWeekStart") + 7 & ".xlsm"
ActiveWorkbook.SaveAs Filename:=strFilename, FileFormat:=52
ActiveWorkbook.Close
End Sub

Last edited by Pecoflyer; 08-11-2019 at 11:57 PM. Reason: Replaced quote tags with code tags
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Emails disappear after closing and re-opening outlook Rhen Outlook 1 01-07-2019 01:16 AM
Closing & Opening Files Track Changes Automatically Accepting Changes after Closing and Re-Opening Document cnethercott Word 1 01-16-2017 03:21 AM
Closing Word files Humptydingo Word 5 09-07-2013 10:17 AM
Update powerpoint on a server without closing an opening dntel123 PowerPoint 0 08-18-2011 02:41 AM
Closing & Opening Files WORD opening and closing is slow chum Word 2 07-05-2010 07:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:26 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