In the following VBA code, there are values in the sheet cells A1, B1,C1, D1 that need…
- User
In the following VBA code, there are values in the sheet cells A1, B1,C1, D1 that need to updated from the entries I make in the last available row. My workbook is very large and set to manual calculation. However in this VBA code I have included a FullCalculation of the sheet. The VBA code runs faster than actual update of the data in the sheet. I have included Wait commands hoping this will help. Can you make suggestions..... Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 4 And Target.Value <> "" Then Application.CalculateFullRebuild Call Request End If End Sub
Sub Request() Application.Wait (Now + TimeValue("0:00:03")) Dim ws As Worksheet Dim wss As Worksheet Set ws = Worksheets("Work Permit") Set wss = Worksheets(Range("P1").Value)
wss.Select Dim lastRow As Long lastRow = wss.Cells(ws.Rows.Count, "B").End(xlUp).Row + 1 wss.Range("B" & lastRow).Value = ws.Range("N1").Value wss.Range("C" & lastRow).Value = ws.Range("C1").Value wss.Range("F" & lastRow).Value = ws.Range("D1").Value wss.Range("J" & lastRow).Value = ws.Range("A1").Value
Application.Wait (Now + TimeValue("0:00:02"))
ws.Select
Call RequestText
End Sub
Sub RequestText() Dim wordApp As Object Set wordApp = CreateObject("Word.Application") wordApp.Visible = True wordApp.Documents.Open "G:\Shared drives\Swan School Site Premises\PREMISES MANAGEMENT\SERVICE PROVIDERS\Request2.docx" wordApp.Activate 'Set focus to the open Word document End Sub
- Assistant
- User
Is there a way in Excel to check for broken links to external files
- Assistant
Yes, Excel has a built-in feature that allows you to check for and manage external links to other files. Here's how to do it:
- Click on the "Data" tab on the Ribbon.
- Click on "Edit Links" in the "Connections" group.
- In the "Edit Links" dialog box, you'll see a list of all the external links in your workbook. Any links with a warning symbol may be broken or inaccessible.
- To update any broken links, select the link and click "Change Source". Browse to the location of the new file and select it.
- If you want to break a link, select the link and click "Break Link".
You can also use the "Check Status" button to see the current status of each link. This will tell you whether the link is working, whether it's out of date, or whether it's missing.
Keep in mind that Excel may not be able to detect all broken links, especially if they have been embedded in formulas or other elements of your workbook. In these cases, you may need to search for and manually update these links.