Refresh a Currently open Excel Sheet?

Bundy

New Member
Joined
Jul 18, 2007
Messages
49
Hi Guys,

Here's scenario.

Person A Opens a document & updates/Saves it all day.

Person B,C,D Open the same document as Read Only.

Is there any VBA Code that can be used to refresh the read only version of B,C,D as maybe a button added to the sheet? (or any other options to use?)
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Nope.

Even with a shared workbook, the other users need to close and reopen the wb in order to see saved changes.

It is possible to have a real-time wb using Groove, but I haven't tried it.

HTH,
 
Upvote 0
Currently they:

Main Workbook--->Copy saved by the main workbook<--------Linked to copy Workbook

Sort of Dangerous, so I was looking for a better solution.
 
Upvote 0
Hello,

Would this help?
Run GoodbyeAndHello
Code:
Sub GoodbyeAndHello()
    Application.OnTime earliesttime:=Now(), procedure:="OpenMe"
    ThisWorkbook.Close savechanges:=False
End Sub
 
Private Sub OpenMe()
'you do not need next line
    MsgBox "Hello again"
End Sub
kind regards,
Erik
 
Upvote 0
Here's the Code we used, with a few small changes.
A1 now show's when it was updated or saved, depending on if it is read only or full access.
If the person has full access, it will only save it and not lose changes.

Thanks All!

Code:
Sub TimerRoutine()
    If ActiveWorkbook.ReadOnly Then
        Application.OnTime earliesttime:=Now(), procedure:="OpenMe"
        
        Application.DisplayAlerts = False
        
        ThisWorkbook.Close savechanges:=False
    Else
        ActiveWorkbook.Save
        ActiveSheet.Range("A1").Value = "Last Saved " & Now()
    End If
End Sub
 
Private Sub OpenMe()
    ActiveSheet.Range("A1").Value = "Last updated " & Now()
    Application.DisplayAlerts = True
End Sub
 
Upvote 0
I had another idea and this might be overkill, but anyway here it is.
To avoid the screen to get empty or changing to other window, you can do this.
Code:
Option Explicit
 
Const TmpName As String = "test.xls"
Const TmpPath As String = "C:\Windows\Temp\" & TmpName
 
Sub GoodbyeAndHello()
ActiveSheet.Copy
ActiveWorkbook.SaveAs TmpPath
Application.OnTime earliesttime:=Now(), procedure:="OpenMe"
ThisWorkbook.Close savechanges:=False
End Sub
 
Private Sub OpenMe()
Workbooks(TmpName).Close
Kill TmpPath
End Sub
 
Upvote 0
I had another idea and this might be overkill, but anyway here it is.
To avoid the screen to get empty or changing to other window, you can do this.
Code:
Option Explicit
 
Const TmpName As String = "test.xls"
Const TmpPath As String = "C:\Windows\Temp\" & TmpName
 
Sub GoodbyeAndHello()
ActiveSheet.Copy
ActiveWorkbook.SaveAs TmpPath
Application.OnTime earliesttime:=Now(), procedure:="OpenMe"
ThisWorkbook.Close savechanges:=False
End Sub
 
Private Sub OpenMe()
Workbooks(TmpName).Close
Kill TmpPath
End Sub

Can't we all use the update button the reviewing toolbar (Excel 2003) and refresh the shared workbook? Ofcourse the master workbook need to be saved.
 
Upvote 0
Hi,
WELCOME to MrExcel!
Your question is not clear to me.
You replied to an old thread. You would better start one of your own if you do not find an answer using the search function of this forum.
You can always add a reference to this thread if you want.
kind regards,
Erik
 
Upvote 0
Hi Erik,

I have almost the same issue with reopening shared file (to update). I would like to know what is the difference between your code
Code:
Sub GoodbyeAndHello()
    Application.OnTime earliesttime:=Now(), procedure:="OpenMe"
    ThisWorkbook.Close savechanges:=False
End Sub
 
Private Sub OpenMe()
'you do not need next line
    MsgBox "Hello again"
End Sub
And
Code:
Sub CloseAndOpen()
    Workbooks("Db.xlsb").Close savechanges:=False
    Workbooks.Open "C:\Users\Administrator\Desktop\Db.xlsb"
End Sub
Will your code close & reopen faster?

Thank you in advance & god bless you.
 
Upvote 0
Hi

Both codes have not the same purpose.

Your code cannot be run from the workbook itself. You code, if place in the workbook "Db.xlsb" would stop running with the "close" line.
My code is to close and reopen "ThisWorkbook".

kind regards,
Erik
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,835
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top