P
Paul
Hi All!
I have this code
sh.Columns(5).Resize(, 2).Copy sh1.Range("a1")
rng(1, res).EntireColumn.Copy sh1.Range("c1")
does anyone know how I can change it so that it will paste a direct link
full code below
Public Sub daily()
Dim rng As Range, rng2 As Range
Dim sh As Worksheet, sh1 As Worksheet
Dim wsheetname As String
Dim res As Variant
Dim DT As Date, s As String
Dim aaaa As String
Dim iii As String
Sheets("planning").Select
Range("A1").Select
s = InputBox("Enter date")
If Not IsDate(s) Then
MsgBox "Entry was not a date"
Exit Sub
End If
DT = CDate(s)
Set rng = Range("E2:bG2")
res = Application.Match(CLng(DT), rng, 0)
If IsError(res) Then
MsgBox "Bad date provided"
Exit Sub
End If
Set sh = ActiveSheet
Sheets.Add After:=Worksheets(Worksheets.Count)
Set sh1 = ActiveSheet
sh.Columns(5).Resize(, 2).Copy sh1.Range("a1")
rng(1, res).EntireColumn.Copy sh1.Range("c1")
Set rng2 = sh1.Columns(1).Find(what:="CALL", _
After:=sh1.Range("A1"), _
LookIn:=xlFormulas, _
lookat:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If rng2 Is Nothing Then
MsgBox "Problems, Call not found"
Exit Sub
End If
sh1.Cells(rng2.Row + 1, 1).Resize(100).EntireRow.Delete
end sub
Thanks
I have this code
sh.Columns(5).Resize(, 2).Copy sh1.Range("a1")
rng(1, res).EntireColumn.Copy sh1.Range("c1")
does anyone know how I can change it so that it will paste a direct link
full code below
Public Sub daily()
Dim rng As Range, rng2 As Range
Dim sh As Worksheet, sh1 As Worksheet
Dim wsheetname As String
Dim res As Variant
Dim DT As Date, s As String
Dim aaaa As String
Dim iii As String
Sheets("planning").Select
Range("A1").Select
s = InputBox("Enter date")
If Not IsDate(s) Then
MsgBox "Entry was not a date"
Exit Sub
End If
DT = CDate(s)
Set rng = Range("E2:bG2")
res = Application.Match(CLng(DT), rng, 0)
If IsError(res) Then
MsgBox "Bad date provided"
Exit Sub
End If
Set sh = ActiveSheet
Sheets.Add After:=Worksheets(Worksheets.Count)
Set sh1 = ActiveSheet
sh.Columns(5).Resize(, 2).Copy sh1.Range("a1")
rng(1, res).EntireColumn.Copy sh1.Range("c1")
Set rng2 = sh1.Columns(1).Find(what:="CALL", _
After:=sh1.Range("A1"), _
LookIn:=xlFormulas, _
lookat:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If rng2 Is Nothing Then
MsgBox "Problems, Call not found"
Exit Sub
End If
sh1.Cells(rng2.Row + 1, 1).Resize(100).EntireRow.Delete
end sub
Thanks