Hi guys - Sorry if there is two questions in this one post but the first leads onto the second.
I have a spreadsheet which is stored on a network drive, not shared but does have vba. Every time someone opens it up it comes up with the below message and this messes up the spread sheet. Any ideas? Should I remove the formula and get the vba to insert the date into the cell when the button is clicked.
I'm not sure how to get the date inserted into column H of the active row when the data is pasted.
Below is my vba which does not work? Any help would be much appreciated. Thanks.
I have a spreadsheet which is stored on a network drive, not shared but does have vba. Every time someone opens it up it comes up with the below message and this messes up the spread sheet. Any ideas? Should I remove the formula and get the vba to insert the date into the cell when the button is clicked.
I'm not sure how to get the date inserted into column H of the active row when the data is pasted.
Below is my vba which does not work? Any help would be much appreciated. Thanks.
VBA Code:
Application.ScreenUpdating = False
Dim lCol As Long, sAddr As String, fnd As Range, x As Long, ws As Worksheet
lCol = ActiveSheet.Cells(4, Columns.Count).End(xlToLeft).Column
x = ActiveCell.Row
Set fnd = Rows(x).Find("y", LookIn:=xlValues, LookAt:=xlWhole)
If Not fnd Is Nothing Then
sAddr = fnd.Address
Do
Set ws = Sheets(Cells(4, fnd.Column).Value)
With ws
Range("A" & x & ":G" & x).Copy .Cells(.Rows.Count, "A").End(xlUp).Offset(1)
[B]Range("H" & (ActiveCell.Row)).Select
ActiveCell.Value = Date[/B]
End With
Set fnd = Rows(x).FindNext(fnd)
Loop While fnd.Address <> sAddr
sAddr = ""
End If
Application.ScreenUpdating = True