ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro for Parameter Query (https://www.excelbanter.com/excel-programming/313851-macro-parameter-query.html)

bchan

Macro for Parameter Query
 

When writing a macro for a parameter query in Excel pivot table, I ca
do this: *“WHERE field = ?” * and I am given a promp
“-Parameter 1-” before running the pivot. I would like t
customize the prompt but have not been successful. I trie
“*WHERE field = [Give Branch Name]*” which works with M
Query but not in VBA. Alternatively, there is a PromptString propert
in VB but it works only for QueryTable (Parameters is not a member o
PivotTable). How do I change the default prompt to something mor
instructive

--
bcha
-----------------------------------------------------------------------
bchan's Profile: http://www.excelforum.com/member.php...nfo&userid=827
View this thread: http://www.excelforum.com/showthread.php?threadid=27008


arno

Macro for Parameter Query
 
Hi,

I think, there's no popup function in Excel for parameters. Have the
user enter parameters into normal inputboxes with VBA, then construct
the query with this data and fire the query (instead of having the
query to prompt for input).

arno

When writing a macro for a parameter query in Excel pivot table, I

can
do this: *“WHERE field = ?” * and I am given a prompt
“-Parameter 1-” before running the pivot. I would like

to
customize the prompt but have not been successful. I tried
“*WHERE field = [Give Branch Name]*” which works with MS
Query but not in VBA. Alternatively, there is a PromptString

property
in VB but it works only for QueryTable (Parameters is not a member of
PivotTable). How do I change the default prompt to something more
instructive?




All times are GMT +1. The time now is 01:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com