Hi guys
Is it possible to hide sheets with VBA code in modular workbook?
I tried but it throws some error and the code is working with other files.Could you clarify?
See code below:
Sub SwitchToUserMode()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Sheets
If wks Is ActiveSheet Or InStr(1, wks.Name, "User") > 0 Then
wks.Visible = xlSheetVisible
Else
wks.Visible = xlSheetHidden
End If
Next wks
End Sub
Hi Yury,
You will need to use the Modano API to do things like hide/unhide sheets within modular workbooks. Download it here: www.modano.com/api/latest
We regularly use this API when providing model build support to clients, as it enables all sorts of things to be automated way above and beyond what you can normally do with VBA.
I've extracted a very small part of the Modano API (the class named ModanoApplication) and put it in the attached workbook along with the following code to hide all sheets other than the cover sheet:
Note that you will need to explicity ignore the worksheet named 'ModanoMeta', as this very hidden worksheet contains the modular data required for Modano to work, so it can't be unhidden using the API.
Apologies Yury - I should have given you more precise instructions rather than just casually mentioned the ModanoApplication class. This class is the class that connects your VBA to the Modano add-in.
There's actually a full object library of classes in the Modano API on top of this. I'll let you know when we release it.
Hi Tarjei, sorry for the belated response.
The easiest way to use the Modano API is to simply include all of its classes when importing the API code. I can walk you through how to do this via a GoToMeeting if you like.
M.
Hi James,
We haven't publicly released the Modano API as such, but we're happy to provide it to users on request.
Please email api@modano.com as ask for the latest version if you'd like to try it.
M.
Hi Guys,
We now allow users to download the latest version of the Modano API using this link: www.modano.com/api/latest
M.