Link to Data Form.

  • Thread starter Thread starter adn4n
  • Start date Start date
A

adn4n

Hi this may sound simple, but i cant get my head around it, ive bee
trying this for time..i would like to have a macro, so that when it i
clicked it will go to data > forms. For some reason it dont seem t
work, can anyone help
 
If you record a macro as you open the data form, the code should look
something like this:

'=======================
Sub OpenTheDataForm()
Range("A1").Select
ActiveSheet.ShowDataForm
End Sub
'=======================

The button on your worksheet should run this macro.

What happens when you click the button on your worksheet?
 
when do i stop the macro recording? after i have closed the data form
it wont allow me to do it, i have tried this and an error 1004 keep
coming up in a dialogue box. i have also tried to stop the macro whils
the data form dialogue box is open, but this still doesn not work as i
stop macro recording toolbar, fade away so that i cannot click the sto
button (most likely because the data form is still opened thats why).
 
Start recording, open the data form, close the data form, and stop
recording.

The table should start in the range A1:B2, or it should be named
"Database".

XL2000: ShowDataForm Method Fails if Data Cannot Be Found
http://support.microsoft.com/default.aspx?id=213835

Also, if you're using Excel 97, the error may be caused by the command
button taking the focus. Set the command button's TakeFocusOnClick to
False, or add the following line at the beginning of the code:

ActiveCell.Select
 
Thankyou ever so much it worked, u people are absoloutely fab! thank
Deb
 
I've struggled with this in the past.
Thanks for the crucial information that the table should start in the range
A1:B2.

Alf
 

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