LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default problem with code. past link instead of copy

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy paste, link problem Tkowal Excel Discussion (Misc queries) 0 October 23rd 09 12:28 AM
To Stan Brown From Robert11 Re Copy & Past Problem Robert11 New Users to Excel 1 February 13th 08 06:36 PM
Link-to-cell copy problem Squeaky Links and Linking in Excel 0 September 12th 05 01:59 PM
Past Link then copy Hal LEGERE-Steam Guy Excel Discussion (Misc queries) 3 December 23rd 04 02:58 PM
Copy and past drawing objects name problem mihai[_2_] Excel Programming 0 July 29th 04 08:08 AM


All times are GMT +1. The time now is 04:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"