Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 11-06-2012, 02:10 PM
macropod's Avatar
macropod macropod is offline Unhiding a workbook and activating it in VBA Windows 7 64bit Unhiding a workbook and activating it in VBA Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Does 'file3' ever become visible when the code is running?

In any event, it seems to me you should be able to dispense with 'file2' by adding code to 'file1' to modify the hyperlink so that it always points to the correct month. You sould be able to do this if, instead of creating the hyperlink directly, you use the hyperlink function. For example:
=HYPERLINK("C:\Users\Gratje\Documents\My WorkBook Base Name"&TEXT(MONTH(TODAY()),"00")&".xlsx","C:\Users\ Gratje\Documents\My WorkBook Base Name"&TEXT(MONTH(TODAY()),"00")&".xlsx")
The above will update the hyperlink everymonth, so that, in January, it points to 'My WorkBook Base Name01', in August it points to 'My WorkBook Base Name08', etc.

The alternative is to use an Auto macro in 'file1' that updates the hyperlink each time it's opened.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
activate, unhide, workbook



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unhiding a workbook and activating it in VBA #REF! error when opening a workbook that contain a refference to another workbook tanababa Excel 2 06-07-2012 03:11 PM
Range(Cell1,Cell2) Error on another workbook controlling some other workbook? tinfanide Excel Programming 1 02-09-2012 04:08 PM
Unhiding a column Maureen Excel 3 09-16-2011 08:57 AM
Unhiding a workbook and activating it in VBA macro to transfer data from one workbook to another workbook virsojour Excel Programming 5 02-01-2011 08:58 PM
Unhiding a workbook and activating it in VBA Select a range in one one workbook while working in other workbook Slow&Steady Excel 1 02-21-2010 03:34 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:24 PM.


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