View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Button won't call macro

This works for me

Sub Button15_Click()
Worksheets("test").ShowDataForm
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"pikus " wrote in message
...
I understand. I'm sure there's a way to use that form like you want,
but I've never done that. It is possible to create a similar form from
scratch which you can customize to your project and that is what I
could help you with. In the meantime, loose the select statement all
together. Though it will be just as successful, what you've done is
exactly the same as this:

Sub Button15_Click()
Worksheets("test").ShowDataForm
End Sub

To see what I mean, open your VBA Editor, if the Project Viewer is not
visible hit Ctrl + R to open it and click on the project you're working
on. On the main menu click Insert--User Form and a blank form and a
toolbox will appear. This form can be given any entry fields and
layout you want and will be much easier to use for what you have in
mind. If you're interested in learning about this say so, I won't go
into it otherwise. If not, I'm afraid I don't know how to open the
form you're talking about... - Pikus


---
Message posted from http://www.ExcelForum.com/