Macro Issue
Here's the macro code:
Sub macUpdate()
'
' macUpdate Macro
'
'
ActiveWorkbook.RefreshAll
Selection.ClearContents
Sheets("Data").Select
Range("Z4").Select
Range("Table_Query_from_MS_Access_Database_4[[#All],[Station]]"). _
AdvancedFilter Action:=xlFilterInPlace, Unique:=True
Range("Z4:Z14").Select
Selection.Copy
Sheets("Scorecard").Select
Range("B7").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=True
Range("A7").Select
End Sub
"Jim Thomlinson" wrote:
Post your code...
--
HTH...
Jim Thomlinson
"thefonz37" wrote:
So I'm trying to record a macro that refreshes data from an Access database,
filters the table to get unique values, then copy/pastes to another sheet to
use those values as column headings (i.e., I'm doing a "Paste
Special"--"Transpose" to make the vertically-listed values paste
horizontally). Only problem is that the macro isn't working completely. The
values refresh goes through and the table updates, but the filtered values
don't copy/paste to the new sheet. If I go through the process manually, it
works, but otherwise I can't get the macro to cooperate.
|