Any suggestion that depends on code to check to see if macros are enabled would
involve macros--and if macros are disabled, they wouldn't work.
One way that you could make the workbook unusable is to create a User Defined
Function. The UDF would break if macros are disabled.
So you could use:
Option Explicit
Function myFunc()
myFunc = 0
End Function
Then you could change important formulas (that return numbers) from something
like this:
=a1+b1
to
=a1+b1+myfunc()
When excel recalculates (usually when it opens, too), the formula will either
evaluate ok (with macros enabled) or return a #NAME? error.
============
If you want to force the user to open your workbook with macros enabled...
(Saved from a previous post)
You could create another workbook that opens your real workbook and then closes
itself. The put a shortcut to that helper workbook on your desktop.
That real workbook could have the password built into it.
Option Explicit
Sub auto_open()
Dim myPWD As String
Dim wkbk As Workbook
myPWD = "hi"
Set wkbk = Workbooks.Open(Filename:="C:\my documents\excel\book1.xls", _
Password:=myPWD)
wkbk.RunAutoMacros which:=xlAutoOpen
'ThisWorkbook.Close savechanges:=False
End Sub
When you're done testing, uncomment that last line. It closes the helper
workbook without saving--could be a pain while you're testing.