- My Forums
- Tiger Rant
- LSU Recruiting
- SEC Rant
- Saints Talk
- Pelicans Talk
- More Sports Board
- Fantasy Sports
- Golf Board
- Soccer Board
- O-T Lounge
- Tech Board
- Home/Garden Board
- Outdoor Board
- Health/Fitness Board
- Movie/TV Board
- Book Board
- Music Board
- Political Talk
- Money Talk
- Fark Board
- Gaming Board
- Travel Board
- Food/Drink Board
- Ticket Exchange
- TD Help Board
Customize My Forums- View All Forums
- Show Left Links
- Topic Sort Options
- Trending Topics
- Recent Topics
- Active Topics
Started By
Message
re: RPA or Excel Macro: Copying sheets from one existing workbook to another.
Posted on 11/15/23 at 12:51 pm to Lazy But Talented
Posted on 11/15/23 at 12:51 pm to Lazy But Talented
As another poster said, github and google are your friend.
The protecting worksheet thing, select the cells you want to have editable, right click > format cells. Theres a pane in that dialog box that's called "protection", make sure the locked check box isn't selected. In your vba macro, use the following language:
Worksheets("Time Entry").Unprotect "Password"
Your macro
Worksheets("Sheet1").Protect "Password" DrawingObjects:=True, Contents:=True, Scenarios:=True, _
UserInterfaceOnly:=True, AllowFormattingCells:=False, AllowFormattingColumns:=True, _
AllowFormattingRows:=False, AllowInsertingColumns:=False, AllowInsertingRows:=False, _
AllowInsertingHyperlinks:=False, AllowDeletingColumns:=False, AllowDeletingRows:=False, _
AllowSorting:=False, AllowFiltering:=True, AllowUsingPivotTables:=False
The protecting worksheet thing, select the cells you want to have editable, right click > format cells. Theres a pane in that dialog box that's called "protection", make sure the locked check box isn't selected. In your vba macro, use the following language:
Worksheets("Time Entry").Unprotect "Password"
Your macro
Worksheets("Sheet1").Protect "Password" DrawingObjects:=True, Contents:=True, Scenarios:=True, _
UserInterfaceOnly:=True, AllowFormattingCells:=False, AllowFormattingColumns:=True, _
AllowFormattingRows:=False, AllowInsertingColumns:=False, AllowInsertingRows:=False, _
AllowInsertingHyperlinks:=False, AllowDeletingColumns:=False, AllowDeletingRows:=False, _
AllowSorting:=False, AllowFiltering:=True, AllowUsingPivotTables:=False
Popular
Back to top
Follow TigerDroppings for LSU Football News