• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

ShowDataForm vba error 1004

Matt_Straya

Member
I am at a loss why this error is occurring the vba is Worksheets("Questions Act").ShowDataForm
this is the error I get - any ideas how to fix it?
69620
 
In order to take advantage of DataForm in worksheet. I believe that you need named range with "database" as it's name defined in the workbook (which .

Or you must have your data range start at A1:B1 area (i.e. top left cell of your data range should intersect with these cell).
Alternately, you can use code to create named range before you use that method.

Ex:
Code:
Sub Demo()
With Worksheets("SomeSheetName")
    .Range("C4").CurrentRegion.Name = "database"
    .ShowDataForm
End With
End Sub
Assuming that your data range intersects with C4, and that there are not blank column/row that will break contiguous range.

However, without knowing specifics of your set up. Bit hard to help. I'd recommend uploading sample workbook as always, it will help us pinpoint your issue and give you high quality solution.
 
Last edited:
You can always desensitize data. I.E. replace names with generic string. And values with randomized number (or generate using RANDBETWEEN() etc). While maintaining workbook structure. This is how we construct samples in a lot of cases.
 
Back
Top