Refreshing My Workbook

bharmsen21

New Member
Joined
Dec 6, 2017
Messages
1
I would like to refresh my workbook when I click on the refresh button that I put in my workbook no matter what. Right now the code I have with the refresh button is

Sub logs()
Dim Sht As Worksheet
Dim checkRange As Range, CheckCell As Range
For Each Sht In ThisWorkbook.Sheets
With Sht
Select Case .Name
Case "Final Four", "Top Left", "Bottom Left", "Top Right", "Bottom Right"
Set checkRange = .Range("A1:Z100") ' set the range for the current sheet
For Each CheckCell In checkRange
If IsError(CheckCell) Then If CheckCell = CVErr(2023) Then Exit Sub
Next CheckCell
Case Else
' do nothing
End Select
End With
Next Sht
ActiveSheet.EnableCalculation = True
lst = Sheets("data").UsedRange.Rows.Count
x = lst + 1
' Display a message when one of the designated cells has been
' changed.
' Place your code here.
Sheets("data").Range("A" & x) = ActiveSheet.Range("I3")
Sheets("data").Range("B" & x) = ActiveSheet.Range("I4")


End Sub

Which only lets me refresh the workbook when there is no error. I would just like my code to run if there is no error but still be able to refresh the page
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Wouldn't you just remove the If statement that checks for errors?
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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