Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Brilliant! That does the job.Hi, I used something like this for another application, You need to create a button and assign the VBA to it when you want it to run. Try this VBA:
Sub Button1_Click()
Dim cell As Range
Set cell = ThisWorkbook.Sheets("Sheet1").Range("C5")
If cell.Value = "X" Then
cell.Value = "" ' Delete the "X"
Else
cell.Value = "X" ' Place an "X"
End If
End Sub
Cheers Duane, I did just that!Being a OCD Access developer, I would give C5 a descriptive range name and then use the name in the VBA.
Hi MintjulepWhat's the use of the "X"?
Are you using it for something like "=if(C5="X","C5 is an X", "C5 is not X")
If so, then toggle a BOOLEAN in C5 so that it's directly useable.
Hi ComboDepending on the purpose of workbook and necessity of other code - if it is the only reason to introduce VBA, I would use data validation instead, with list as entry type and range consisting of two cells, with 'x' in one of them (hard-coded blank in DV list does not work). With entry and error messages it is simple and descriptive UI option.