Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default passing parameter to a ms query


hi... im running excel from a remote program and i need to pass a
parameter for a ms query, such as a primary key, ...
the call for the excel is treated like a dos calling: excel.exe
c://file.xls .. and it opens the file.xls.. but it has a ms query
and i need to pass a primary key

ideas?


--
redf1re
------------------------------------------------------------------------
redf1re's Profile: http://www.excelforum.com/member.php...o&userid=31258
View this thread: http://www.excelforum.com/showthread...hreadid=509317

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default passing parameter to a ms query

You can pass parameters to an Excel query very simply either as hard coded
values or from cells or, if a user is present, typed into boxes.

I'm not sure how you will implement this in your scenario, maybe in the
workbook_open() event, but here is a link to my site with the GUI
implementation

http://www.nickhodge.co.uk/gui/datam...taexamples.htm

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk


"redf1re" wrote in
message ...

hi... im running excel from a remote program and i need to pass a
parameter for a ms query, such as a primary key, ...
the call for the excel is treated like a dos calling: excel.exe
c://file.xls .. and it opens the file.xls.. but it has a ms query
and i need to pass a primary key

ideas?


--
redf1re
------------------------------------------------------------------------
redf1re's Profile:
http://www.excelforum.com/member.php...o&userid=31258
View this thread: http://www.excelforum.com/showthread...hreadid=509317



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default passing parameter to a ms query


thanx... but my problem is that i need the value not by typing o
getting it from a cell.. i need to pass that value as i open excel ..
understand what i mean? i need to pass the value outsite excel to th
inside,
my user wont type it inside excel but outsite, in that remote program

well.... just to make clear im using a ERP from oracle called JDE (o
One World), and im trying to pass this information from the jde t
excel ..

--
redf1r
-----------------------------------------------------------------------
redf1re's Profile: http://www.excelforum.com/member.php...fo&userid=3125
View this thread: http://www.excelforum.com/showthread.php?threadid=50931

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default passing parameter to a ms query


lets make it easier...
how can i call excel from dos writing something on a cell ?? that would
do

something like c://excel.exe c://teste.xls "bla bla bla " in H9


--
redf1re
------------------------------------------------------------------------
redf1re's Profile: http://www.excelforum.com/member.php...o&userid=31258
View this thread: http://www.excelforum.com/showthread...hreadid=509317

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default passing parameter to a ms query


:) ;) up ;

--
redf1r
-----------------------------------------------------------------------
redf1re's Profile: http://www.excelforum.com/member.php...fo&userid=3125
View this thread: http://www.excelforum.com/showthread.php?threadid=50931



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default passing parameter to a ms query

Explained how it is, only by writing an app that can open the workbook and
pass the variable between the two. Certainly there is now way to pass a
value into a cell via dos in Excel/VBA

Have you considered doing it the other way? Extracting the data *into* the
cell *from* the Excel workbook using ODBC/OLE DB/ADO?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk


"redf1re" wrote in
message ...

lets make it easier...
how can i call excel from dos writing something on a cell ?? that would
do

something like c://excel.exe c://teste.xls "bla bla bla " in H9


--
redf1re
------------------------------------------------------------------------
redf1re's Profile:
http://www.excelforum.com/member.php...o&userid=31258
View this thread: http://www.excelforum.com/showthread...hreadid=509317



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default passing parameter to a ms query

Create a WSH script to automate the launching of Excel, opening the workbook
and inputting the value.
You can control the WSH script by passing parameters when you shell it.

Simple command line example he
http://cis.stvincent.edu/wsh/args.html

--
Tim Williams
Palo Alto, CA


"redf1re" wrote in
message ...

lets make it easier...
how can i call excel from dos writing something on a cell ?? that would
do

something like c://excel.exe c://teste.xls "bla bla bla " in H9


--
redf1re
------------------------------------------------------------------------
redf1re's Profile:

http://www.excelforum.com/member.php...o&userid=31258
View this thread: http://www.excelforum.com/showthread...hreadid=509317



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
Passing chartobject as a parameter to sub David Cohen Excel Programming 0 September 21st 05 09:58 PM
Passing a Sub's name as parameter Stefi Excel Programming 7 June 20th 05 08:48 PM
Passing parameter to a query Dwaine Horton[_3_] Excel Programming 6 April 26th 05 02:24 AM
?Passing argument/parameter just starting Excel Programming 1 October 23rd 04 04:23 PM
Passing a parameter to Excel keepitcool Excel Programming 3 August 13th 03 03:57 AM


All times are GMT +1. The time now is 05:39 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"