Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Why is my clipboard empty?
I wrote a macro to filter my worksheet and hide certain columns, then sort
and select the results and copy to the clipboard so I can paste into Word. It worked fine - until I stuck in some more code to un-filter, un-sort, and un-hide everything to reset the workbook. Then, when the code opens my Word doc, the clipboard is empty. What am I doing wrong? Ed Here's the relevant sections. This works if I comment out between the ***. ' Put range on clipboard ActiveCell.SpecialCells(xlLastCell).Select Range(Selection, Cells(1)).Select Selection.Copy *** ' Reset worksheet ' Unhide everything Sheets("Sheet1").Activate Sheets("Sheet1").AutoFilterMode = False With Cells .EntireColumn.Hidden = False .EntireRow.Hidden = False End With ' Resort to TIR No. ' Module 12 SortTIRNo *** ' Open template, which has Auto_Open macro ' to paste clipboard and make EFF tables doc = "C:\Documents and Settings\username\Desktop\Reports\TablesTemplate.d oc" Set WD = CreateObject("Word.Application") WD.Documents.Open doc WD.Visible = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cannot empty the clipboard | Excel Discussion (Misc queries) | |||
Clipboard empty but still get waring that clipboard is full | Excel Discussion (Misc queries) | |||
Clipboard empty but get cannot empty CB when trying to copy | Excel Worksheet Functions | |||
cannot empty the clipboard | Excel Discussion (Misc queries) | |||
Cannot empty the Clipboard | Excel Discussion (Misc queries) |