VBA trying to open data entry form but sheet with data needs to be hidden

awesomeamz

New Member
Joined
Aug 23, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hiya, I currently have 2 tabs within my document. The first sheet titled Dashboard has a macro button that opens a data entry form that is on sheet called Form Question Data.

My issue, is that I want to keep the Form Question Data sheet hidden but every time I run the macro to open the form, it won't open if I hide the sheet.

Can anyone help me with a simple code to run the macro whilst keeping this sheet hidden?

This is what it currently looks like:

Sub Macro3()
'
' Macro3 Macro
'

'
Sheets("Form Question Data").Select
Columns("A:X").Select
Range("X1").Activate
ActiveSheet.ShowDataForm
End Sub
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
AFAIK you cannot activate or select hidden sheets - and you probably don't need to. If you're trying to edit it with vba, then just do that.
e.g. sheets("mySheetName").range("A1") = "Hello"
 
Upvote 0
Hi & welcome to MrExcel.
As far as I know the in-built data form only works on the active sheet.
If you need to keep it hidden, then you will need to create your own userform.
 
Upvote 0
I didn't realize this was about a data form. Seems that you can have your cake and eat it too. In the immediate window I executed the 2 lines in order and this is what I saw:

1692795129935.png
 
Upvote 0

Forum statistics

Threads
1,215,089
Messages
6,123,058
Members
449,091
Latest member
ikke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top