Quick background of project:
I have an excel table where the furthest right column needs to be copied one column to the right each time the button above that furthest right positioned column is pushed. Everything must be copied over, including values and formats. I have this working great except that after the "third" newly created column, the formatting is lost. I'm now at the point where I need some fresh eyes to look at this code for me.
I've given it 4 hours of troubleshooting and I'm nowhere further ahead then I was 4 hours ago. Any help, or direction that somebody can give me is greatly appreciated.
Here is my working code. (Up until the "4th" new column that is)
Sub CopyColRngPasteNxtCol()
' Copies Column below button, pastes to next column to the right
ActiveSheet.Buttons(Application.Caller).TopLeftCell.Select
ActiveCell.Offset(1, 0).Resize(170, 1).Copy
ActiveCell.Offset(1, 1).PasteSpecial xlPasteAll
' Copies Macro Button from previous location, pastes above new column
ActiveCell.Offset(-1, -1).Copy
ActiveCell.Offset(-1, 0).Select
ActiveSheet.Paste
' Selects ProjectData Table, turns off Filters
ActiveSheet.ListObjects("ProjectData").ShowAutoFilterDropDown = True
ActiveSheet.ListObjects("ProjectData").ShowAutoFilterDropDown = False
End Sub
Please don't hesitate to respond with any questions or concerns. I will be very quick to reply as I need to clear this hurdle before I can continue on with the project.
Bookmarks