 |
| Access VBA Discuss using VBA for Access programming. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 31st, 2007, 03:33 AM
|
|
Registered User
|
|
Join Date: Oct 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Linker error.help
I have linked an excel sheet which label,button, combo box etc.(code is vba written) While linking this excel to access it shows error excel is not in correct format. If i keep the excel sheet open i am able to link.Is there anyway to over come this error as i have so many excel sheet(12)...
vidhya
|
|

October 31st, 2007, 06:37 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
It sounds like Access will not work with a closed Excel spreadsheet here. In that case, you need to open the spreadsheet (without making it visible) in order to expose the objects you want to work with, when you want to work with them.
Do you need help with that code?
mmcdonal
Look it up at: http://wrox.books24x7.com
|
|

November 1st, 2007, 12:58 AM
|
|
Registered User
|
|
Join Date: Oct 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
yes i need help, regarding code.At present i have opened all excel sheet(12),link it and then queried. If i close the excel sheet after linking, at the time of query again shows error "excel sheet is not in correct format". It seems i have to keep the excel open all the time. Thanks a lot for replying.
vidhya
|
|

November 1st, 2007, 07:37 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
Well, since Excel can't be updated while you are in it, and I think it takes a snapshot of the data only, even if the application persists, why don't you import the data you need as you need it, and forget the whole Excel management issue? Every time you want to run a query, bring the data in to a local table, and then query it from within Access. Be sure to create the necessary delete query to remove all the data from the table before you do each import.
How do you want to proceed?
mmcdonal
Look it up at: http://wrox.books24x7.com
|
|

November 12th, 2007, 02:54 AM
|
|
Registered User
|
|
Join Date: Oct 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Well, since Excel can't be updated while you are in it, and I think it takes a snapshot of the data only, even if the application persists, why don't you import the data you need as you need it, and forget the whole Excel management issue? Every time you want to run a query, bring the data in to a local table, and then query it from within Access. Be sure to create the necessary delete query to remove all the data from the table before you do each import.
How do you want to proceed?
mmcdonal
If i bring the data to local table, i cant refresh the data each time using linked table manager....
As u said i want help regarding making the excel open without visible... I want to proceed in this way...help me
vidhya
|
|
 |