B
Bongard
I originally wanted to write a macro that would copy the value in the
status bar (sum of your selection or whatever function you have chosen)
but since I only use the sum function I thought it would be easier to
just use the sum fucntion of selection and copy it to the clipboard. I
found this macro and avice from an earlier post.
Sub Macro1()
'' Keyboard Shortcut: Ctrl+Shift+S
Dim MyData As DataObject
Set MyData = New DataObject
MyData.SetText
WorksheetFunction.Sum (Selection.SpecialCells(xlCellTypeVisible))
MyData.PutInClipboard
End Sub
In order to run since MyData is earlybind, you must go to tools
reference in
the VBA editor and select Microsoft Forms 2.0 Object Library. Or you
can
change to late bind (i.e. use CreateObject)
That being said, when I try to run the macro it gives me the error
Compile Error --- User-Defined type not defined.
In tools references in VBA I can not find that forms 2.0 object library
so I don't know if that is the problem.
Any ideas???
Thanks in advance!
status bar (sum of your selection or whatever function you have chosen)
but since I only use the sum function I thought it would be easier to
just use the sum fucntion of selection and copy it to the clipboard. I
found this macro and avice from an earlier post.
Sub Macro1()
'' Keyboard Shortcut: Ctrl+Shift+S
Dim MyData As DataObject
Set MyData = New DataObject
MyData.SetText
WorksheetFunction.Sum (Selection.SpecialCells(xlCellTypeVisible))
MyData.PutInClipboard
End Sub
In order to run since MyData is earlybind, you must go to tools
reference in
the VBA editor and select Microsoft Forms 2.0 Object Library. Or you
can
change to late bind (i.e. use CreateObject)
That being said, when I try to run the macro it gives me the error
Compile Error --- User-Defined type not defined.
In tools references in VBA I can not find that forms 2.0 object library
so I don't know if that is the problem.
Any ideas???
Thanks in advance!