How to Build your own Executable Program using Microsoft Excel VBA (Tic-Tac-Toe) – Mimic


Please Refer to this Post How to make

TicTacToe Program Excel VBA

Well, I may be honest with you, it’s just actually a mimic but it’s very useful to impress your friends or even your love ones.We’ll just use trick here.
So let’s see here 1st
Do we have a pre-build program?
If you don’t have one, download this file from my drive

If you are unsure about this file do not hesitate to scan, scan first using your Anti-Virus Program

  1. Open your pre-build program
  2. Go to developer tab
  3. Click view code
  4. Left pane (by default view) of the coding window, look for “ThisWorkbook”, under Microsoft Excel Objects of Project Explorer.
  5. Double click it, Copy the code below
    • Private Sub workbook_open() ‘Our code will run at the time the workbook opened or activated
      ThisWorkbook.Application.Visible = False ‘This will hide our excel application, but remains the FORM
      tttfrm.Show ‘this is our form, “Tic-Tac-Toe”, it will show our game but not the main excel application
      End Sub
  1. The green coding are just comments, even you copy-paste those, it will not affect the program
  2. Let’s try it first 
  3. Close your Microsoft Excel Application
  4. Double click your file Tic-Tac-Toe.xlsm (This is my file name)
  • As you can see there’s no more excel application running , but if you check the task manager (Ctrl+Shift+Esc) it runs in the background
  • It actually hides but not closing the entire application (that’s another trick)
  1.  Now for the main trick, we have to change the icon of our Excel File or Workbook
  2. Unfortunately we cannot change the icon of our main file , we’re gonna use another trick and what was that?
  3. Well the trick is ,we must create a shortcut for our excel file. Right-click the Excel File then click “Create a Shortcut”. see image below
  4. From Tic-Tac-Toe Shortcut file right click it, go to properties and click the “Change Icon” button
  5. Browse your Icon File
  6. I have already provided you an Icon File (if you want to customize your icon, go here)
  7.  Please download from this link
  8. Hit Open –>Ok –>Apply and Ok
  9. Hide your Tic-Tac-Toe Main file or move it to your Documents Folder
  10. CONGRATULATIONS! You’ve just created your own Executable Program using Microsoft Excel

NOTE: As i said Earlier, even you close the game, the excel application is still running. To close this, do any of the following procedure

    1.  Open Task Manager [CTRL+SHIFT+ESC] or type in search bar “Task Manager” then enter. Find under the Image Name, “EXCEL.EXE”. Right-click the process and click “End Process”  (beware of this, this will close all your opened Excel files. Save all your work before closing)
    2. By using temporary file. Search in the search bar, “Show hidden files and folders” hit enter. Under the Hidden files and folders icon, click “Show hidden files, folders and drives”. Click Apply and Ok buttons. Go to the directory of where the file is placed, (mine is on the desktop)  and find this file name “~$Tic-Tac-Toe”. Open it, ignore the error ,you can close the Microsoft Excel Application.
    3. Lastly, draw another command button place within the FORM, so we can easily tell the computer to close our App
      •  Change the caption to “Quit”
      • Inside the coding, type this within the sub “Application.quit”
      • To change the colors of the Buttons, just choose from BackColor from Properties(F4)
      • Save it
      • Close File
      • Execute it!
      • Finished, that was easy!

I intended to separate the quit button so that the user should understand the difference between “hide” and “quit”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s