Begin by opening a new sheet in Excel. Click "File" and go to the bottom left and press "Options". Click the "Customize Ribbon" button. Go to the right side panel and click the check box that says "Developer".

Click the "Trust Center" button in the far left side bar and go to "Trust Center Settings...". From here click "Macro Settings" button in the new left side bar and select "Enable all macros" and check the box beneath that says "Trust access to the VBA project object model". Click the "Ok"s at the bottom of the menu.

I can sense your eagerness. Calm down. There are a few more steps.

From here, go to the "Developer" tab and press the "Visual Basic" button. This is what you should see. Right click the folder that says "Microsoft Excel Objects", hover over "Insert" and then press "Module". Double click into the new module that just appeared.

You're almost there.

Copy this spoilered code into the white space to the right.

'start shirking obligations
Sub cmdStart_Click()
Dim x As Long
For x = 1 To 1000000000
Cells(7, 2) = "Running"
Cells(1, 1).Select
SendKeys "{down}"
Application.Wait (Now + TimeValue("0:00:02"))
DoEvents
Next x
End Sub

'stop shirking obligations
Sub cmdStop_Click()
Cells(7, 2) = "Not Running"
End
End Sub

'will automatically set to not running upon opening workbook
Private Sub Workbook_Open()
Cells(7, 2) = "Not Running"
End Sub

_
Home stretch. I can sense that you're ready to give your boss the finger. We're so close.

Close the Visual Basic window and go back to "Sheet1" or whatever it is called. Under the "Developer" tab, press the button that says "Insert" and under the "Form Controls" section select the top left button, which is "Button". Press anywhere in the sheet, hold and drag the mouse to create the button. A menu will appear demanding that you select a macro for the button, select "cmdStart_Click". Do this again with another button to the right but select "cmdStop_Click" in the popup menu. These are your start and stop buttons if that isn't painfully obvious. Rename them if you want, I really don't care.

You're spreadsheet should look like this. Go to "File" and select "Save As". Click "Browse" and save it wherever the fuck you want. The main thing you want to pay attention to is selecting "Excel Macro-Enabled Workbook (*.xlsm)" in the "Save as type:" dropdown. This will let you reuse the workbook.

Congratulations. You're now ready to shirk your obligations at your bullshit job. Have fun. Use it wisely.

  • WhatDoYouMeanPodcast [comrade/them]
    ·
    edit-2
    4 years ago

    Any work automation you do should be kept as secret as union organizing efforts.

    I came to the same conclusion. There was even a point where I had the philosophical question: if automation made it such that a single person's work day was enough to produce enough food for everyone, why shouldn't everyone be able to eat? Say it's a hyper intelligent AI system with 1,000,000 arms capable of taking care of fields of plants, livestock, etc. and it repaired itself. There was only one engineer needed to make sure the central hub was operational 8 hours a day. Should that much automation be a bad thing? Should we intentionally make it harder to feed people so more people are justified eating? Should only the one person deserve to live? It seemed absurd to me. It wasn't my first "real" job, but this VBA one was the tipping point for me.

    I feel like I'd be such a brat that I don't think I could justify to myself WRITING DOWN FILE NAME TRANSFERS. VBA is capable of doing that by itself as a single macro sheet. I'd have probably left.