Hi All,
Just a quick one, I have the below VBA Code where a user selects their data using drop downs on an opening sheet titled 'Report Builder'. The code takes the filtered data from a Master table titled 'Actions' (this master table is hidden and protected), and performs a 'Paste Special' onto a blank worksheet titled 'My team's actions'. I have attempted to perform some minor formatting on the new sheet, without much luck.
Specifically, can the new range of data on the 'My team's actions' be formatted as a table once the paste special has ceased?
Any assistance would be greatly appreciated,
bosko2
Just a quick one, I have the below VBA Code where a user selects their data using drop downs on an opening sheet titled 'Report Builder'. The code takes the filtered data from a Master table titled 'Actions' (this master table is hidden and protected), and performs a 'Paste Special' onto a blank worksheet titled 'My team's actions'. I have attempted to perform some minor formatting on the new sheet, without much luck.
Specifically, can the new range of data on the 'My team's actions' be formatted as a table once the paste special has ceased?
VBA Code:
Set DbExtract = ThisWorkbook.Sheets("Actions")
Set DuplicateRecords = ThisWorkbook.Sheets("My team's Actions")
With Sheets("Report Creator")
If .Cells(2, 1) <> "" Then
Sheets("Actions").Range("A1").AutoFilter 11, .Cells(2, 1).Value
End If
If .Cells(2, 2) <> "" Then
Sheets("Actions").Range("A1").AutoFilter 12, .Cells(2, 2).Value
End If
If .Cells(2, 3) <> "" Then
Sheets("Actions").Range("A1").AutoFilter 13, .Cells(2, 3).Value
End If
.Select
End With
Sheets("Safety Accountability Dashboard").Select
Sheets("Actions").Visible = True
Sheets("Actions").Select
Sheets("My team's actions").Visible = True
DbExtract.Range("A1:BF9999").SpecialCells(xlCellTypeVisible).Copy
DuplicateRecords.Cells(1, 1).PasteSpecial
Sheets("Actions").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("My team's actions").UsedRange.AutoFilter
Selection.WrapText = True
Sheets("My t[COLOR=rgb(0, 0, 0)]eam's actions").Select
ActiveSheet.Rows("1:1").Select
Selection.Font.Bold = True[/COLOR]
Selection.HorizontalAlignment = xlLeft
Sheets("Report Creator").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("Safety Accountability Dashboard").Select
End Sub
Any assistance would be greatly appreciated,
bosko2