LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 59
Default Copy Status bar macro

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!

 
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
Macro copy and paste = blank worksheet efface Excel Discussion (Misc queries) 1 April 27th 06 09:52 PM
Copy from WORD to EXCEL using a macro..... Tee Excel Discussion (Misc queries) 1 March 1st 06 06:46 PM
Want macro to select & copy cells from a different worksheet RocketRod Excel Discussion (Misc queries) 5 February 28th 06 12:53 PM
Recorded Macro to Copy Format Lilbit Excel Worksheet Functions 5 January 10th 06 09:42 PM
Activate a macro to insert a row and copy the formuals from the rows above to the blank row oil_driller Excel Discussion (Misc queries) 1 February 11th 05 03:30 PM


All times are GMT +1. The time now is 10:03 PM.

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"