Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Button won't call macro

Have the following code on one sheet, "detail", and want to activate th
Data Form on the "test" sheet, same workbook.

Sub Button15_Click()

Select Case Application.Caller
Case "Button15"
Worksheets("test").ShowDataForm
End Select
End Sub

When I debug running to cursor, I get a Run-time error "13", typ
mismatch when the cursor is after "showdataform".

Thanks in advance.

Have Excel 2000...........

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Button won't call macro

Your Select Case statement is unnecessary. Get rid of it. The proble
you're getting comes from the fact that the "form" you created in th
worksheet is not a "Form" as we generally refer to in Excel. Go int
your VBA editor and on the main menu select Insert--User Form. Wha
gets added is something you could make up to take the same information
but requires you to add all the fields and titles and buttons yourself
From there the information may be placed into the spreadsheet anywher
you'd like. The code you would use to call that form is:

Form1.Show

Though giving it all the functionality you want will be a little (bu
not much) more involved. - Piku

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Button won't call macro

Pikus, Have deleted Case. The data form I want to pull up is th
standard data form you get in Excel from the dropdown "Data" the
"Form". The 'test' sheet has the database on it and I want to be abl
to add/subtract to the data base with an update button on the 'detail
sheet.

Deleting Case causes a syntax error with the message "expecting CASE".
Code now looks like:

Sub Button15_Click()
Select Application.Caller
"Button_15"
Worksheets("test").ShowDataForm
End Select
End Sub

but it won't compil

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can run a macro ( call a macro) on selection of any filtercriteria? [email protected] Excel Worksheet Functions 7 February 20th 09 12:34 AM
How can I call IE browser (Back button) through Excel macro? SAM SEBAIHI Excel Discussion (Misc queries) 0 December 14th 06 12:49 AM
How can I call IE browser (Back button) through Excel macro? SAM SEBAIHI Excel Discussion (Misc queries) 0 December 13th 06 04:50 AM
Button fails to call macro when open an Excel via Intranet tigertax Excel Discussion (Misc queries) 1 April 12th 05 10:21 AM
button to call website Andrew Harder Excel Programming 2 November 25th 03 02:27 PM


All times are GMT +1. The time now is 01:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"