I am trying to format all the cells in the selected column. I got the below code to format for the selected cell.
Thank you!
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
f3::
oExcel := ComObjActive("Excel.Application")
dash := "-"
space_ := " "
blank_ := ""
Active_cell := oExcel.activecell
Active_cell.replace(dash, blank_)
Active_cell.replace(space_, blank_)
oExcel.activecell.NumberFormat := "000-0000 0000"
return