Thread
:
ActiveSheet.Name?
View Single Post
#
6
Posted to microsoft.public.excel.programming
Andrew Stedman
external usenet poster
Posts: 2
ActiveSheet.Name?
Hi Chip,
Thanks very much for your help, the code works great!
Andrew
in article , Chip Pearson at
wrote on 27/7/03 9:03 PM:
A better solution is
Sub CopySum()
Dim Arr As Variant
Dim N As Long
Dim MyDataObj As New DataObject
Dim str As String
Arr = Split(Selection.Address, ",")
For N = LBound(Arr) To UBound(Arr)
str = str & "," & Selection.Worksheet.Name & "!" & Arr(N)
Next N
str = Mid(str, 2)
MyDataObj.SetText "=sum(" & str & ")"
MyDataObj.PutInClipboard
End Sub
Reply With Quote
Andrew Stedman
View Public Profile
Find all posts by Andrew Stedman