473,387 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to pass a parameter from excel to vb?

3
I'm attempting to to display info on Excel from a recordset, blah de blah...

On my output, I've got a button which I'm hoping to trigger more code from vb if required.

How can I then pass the paramter from the button_click on the Workbook back through to my program??

Thanks in advance!!
Jan 11 '10 #1
3 2197
Delerna
1,134 Expert 1GB
Do you mean
You have a button on the spreadsheet
When you click the button it will execute some VBA code on that same spreadsheet
?

The parameter that you want to pass...where is it coming from?
I ask because a button is meant to respond to a user click. Its not
really intrinsically associated with any data that needs to be passed.

If its data that has been entered into a cell, for example. Then the VBA code that handles the onclick for the button would access that cell directly. It wouldn't be passed in a parameter


PS
Note the distinction between VBA and VB
VBA is a cut down version of VB that is used in applications such as Excel, Word and Access
Jan 11 '10 #2
Naldo
3
Delerna

No, what I mean is that I have a button on the spreadsheet and when I click it, i want it to execute VB code back in my application, not in the spreadsheet.

I don’t necessarily have to pass a particular parameter, I am wanting the button on the spreadsheet to act as a trigger for more output to be produced.

For example, on my application you click, say, ‘Print Report’ which gives you summary info, then you click the ‘More Detail’ button on the spreadsheet to then execute more code which returns more detail on the spreadsheet! The user might not want all the detail all of the time!

I'm thinking either that I could set up an ODBC connection and use Let's or something along those lines?!?!

Thanks for your help!
Jan 12 '10 #3
CyberSoftHari
487 Expert 256MB
Use Exel Macros.
(Try your best and Explain your problem in detail.)
Jan 12 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Belinda | last post by:
Hello All I have the following test.asp page which needs one parameter querystr but my querystr is a very long string value. When I send a long value the query string is getting truncated after...
7
by: Zlatko Matić | last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL Server) and that we want to execute some parameterized query as a pass.through query. How can we pass parameters to the...
4
by: deko | last post by:
This is a basic program flow question. I'm trying to refractor an AC2000 app and split sections of code into separate modules. But there are a number of collections I create in one big module -...
9
by: Jay Douglas | last post by:
Hello, I am needing to pass a class object (this) by reference to a method in a different class. When I do the following code I get the error (Cannot pass '<this>' as a ref or out argument because...
6
by: emsik1001 | last post by:
Hi Everyone I want to fire a stored procedures (SQL Server 2000) from Excel using SQLCMD but I want to be able to change the variable value by typing it in the 'parameter value' box. Many...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
8
by: Rich P | last post by:
(this is way easier in VB.Net -- but here is how to do it from Access) '------------------------------------------------ Public Declare Function apiShellExecute Lib "shell32.dll" _ Alias...
18
by: pinky8 | last post by:
I have an ASP page with a button and other things. When the button is clicked, it executes a javascript function which does: document.Form1.method = 'post'; document.Form1.action =...
9
by: JRough | last post by:
I tried to pass the $result from a mysql_query in a url like this line Header("Location:clm_historyXL.php?_result=".$result); but on the redirect location clm_history.php page I get an error on...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.