[AccessD] Excel Object - Can You Tell What Row Or Column Is Clicked

Paul Hartland paul.hartland at googlemail.com
Fri Jun 24 09:15:24 CDT 2016


Thanks Jim,

The vision I sort of have for this is an Access form with a button to
select the Excel file, then open the Excel file and show it on that form
for the user to select a row and/or column depending on what sheet is open,
store the row and/or column values in Access along with the Excel sheet
index, then once the user has done this for all six sheets close the Excel
object, then I can run the rest of my code which I have already....I just
need to know how to open the selected Excel file on a Access form and store
the row/column values that the user selects into Access variables.....Would
you be able to point me to a site with something similar so I can get a
better idea of how to do this please.

Many thanks in advance once more.

Paul

On 24 June 2016 at 14:56, Jim Dettman <jimdettman at verizon.net> wrote:

>
>  Yes that is possible.
>
>  Via automation, anything you can do in Excel manually, you can do through
> VBA and the object interface.
>
>  It's also possible to link to an Excel spreadsheet and read it as a table.
>
>  And last, you can just transfer the data into Access with
> Transferspreadsheet.
>
>  Not quite sure though which method would work best for you, but what your
> looking to do can be done one way or another.
>
> Jim.
>
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> Paul Hartland
> Sent: Friday, June 24, 2016 09:45 AM
> To: Access List
> Subject: [AccessD] Excel Object - Can You Tell What Row Or Column Is
> Clicked
>
> To all,
>
> A little background...I was given a task where an Excel sheet has upto 300
> different branches on it and about 6 sheets....The branch name is in each
> sheet and can be in there multiple times.  So I wrote a little VBA module
> that looked at the first sheet, gets a unique list of branch names, then
> one by one filters the six excel sheets by the branch name....ends up
> making a workbook with six sheets for each branch with only that branch
> name on.....
>
> But now I want to try and make a little front-end application, where the
> user is given an open file dialog to select the Excel sheet, then the user
> is presented with each of the six sheets in turn and asked to click a row
> and/or a column and the row number and/or column letter are stored in
> Access.....Is this possible, I have never done anything like that before, I
> have played with Excel objects etc, but nothing where the user selects a
> row from an Excel sheet and the value is passed back into Access, and I
> can't really seem to find anything on the internet...
>
> Thanks in advance for any help on this.
>
>
>
> --
> Paul Hartland
> paul.hartland at googlemail.com
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



-- 
Paul Hartland
paul.hartland at googlemail.com


More information about the AccessD mailing list