DataForm.Show does not work in code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all
I am trying to have the Data Form show upon a click of a button so that a
list can be updated, but the codes below do not seem to work.
Is it possible to have the ready made Form in >Data > Form
pop up with a code?

Sub ready()
Range("AS1").Select
frmDataForm.Show
End Sub

Thanks a bunch in advance











Sub ready()
Range("AS1").Select
ActiveSheet.ShowDataForm
End Sub
 
Hi,
How is code started form the button?

Use the Forms toolbar, select a button, place button in your worksheet and
assign your macro (READY) to it.

Click the button and the form should appear.

HTH
 
I get a Run Time Erroe 424 "Object required
when the button is clicked.
 
The name on the Form is 'Update'
tried it with the name:

Sub ready()
Range("AS1").Select
frmUpdate.Show
End Sub


here the error is 438 - Object doesn't support this property or method

Sub Macro3()'
Range("AS1").Select
ActiveSheet.frmUpdateVisible , True
End Sub

???? I'm trying to edit both codes to see which one gives me what I want
first...
Thanks for your help.
 
If form name is "Update" (the name in the Properties of the Userform) then
use "Update.show". Your code is looking for a form called "frmUpdate".
 
Sub Macro3()
Range("AS1").Select
UpDaTe.Show <========
End Sub


Everytime I type Update, it changes to UpDaTe

??? why is that, I found a code which was named UpDaTe, and deleted it but
it still does that change.
 
Update is reserved word so rename your form to "frmUpdate".

If you want, post your workbook to me - (e-mail address removed) - and
I'll look at it offline.
 
Sub ready()
Range("AS1").CurrentRegion.Name = "Database"
frmDataForm.Show
End Sub
 
His original question doesn't use a Userform. He is using the built in
dataform.
 
Hey, Guys
I think your input on this forum is just awsome, I have had so much positive
help from here, that it spurs me on to learn all this macro / VBA stuff
cheers.
Petra ( not from Blue Peter either...)
 
THIS ONE WORKS!!!!!!
I've played around with it, but for some reason, this one does it.
Thanks for all your help.

Sub ShowForm()
Range("AS1").Select
ActiveSheet.ShowDataForm
End Sub
 
I misread his code and assumed he was trying to use the Data => Form
command. based on his lastest post, that is apparently what he is doing,
but used the wrong command. (which I missed). My answer should have been

Sub ready()
Activesheet.Range("AS1").CurrentRegion.Name = "Database"
ActiveSheet.ShowDataForm
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top