Wrox Programmer Forums
|
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
 
Old December 15th, 2004, 11:38 AM
Authorized User
 
Join Date: Dec 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default VBA Excel

Hi
I am using VBA to populate data to an excel template.
 So i called the sheet
using

 Dim SalaryBook As Excel.Workbook
Set SalaryBook = GetObject("C:\WINDOWS\Temp\Carbon.xls", "Excel.Sheet.8")

My problem is, since there is a macro in the excel sheet,
the above call will open a model dialoge box from EXCEL with options enable macro,disable macro and more info option.

My problem is that i can not click on this option button in the above dialoge box.
Some how it is in the back ground only.
I think I need to make the excel visible to click it?
In debug mode i can click on it.
But in run mode i can not click on it.
Help me.

 
Old December 15th, 2004, 12:15 PM
Authorized User
 
Join Date: May 2004
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

One way to get rid of this messages is to set the Macro Security level to "low".

I use to open excel workbooks this way:

Dim oApp As New Excel.Application
    oApp.Workbooks.Open "..path here ..", False
    oApp.Visible = True

One problem could be that the new excel application may not load the add-ins installed, so you may have to add a line like:

oApp.RegisterXLL ...

Does it solve your problem?
Mihai

 
Old December 15th, 2004, 01:56 PM
Authorized User
 
Join Date: Dec 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the reply,
I tried to reduce the macro security.
it is not saving it. going back to medium radio button option, even if i selected low or high.

I setted like this in a new Excel sheet.
my version is office 2003.

On the Tools menu, click Options.
Click the Security tab.
Under Macro Security, click Macro Security.
Click the Security Level tab, and then select the security level you want to use

any idea?

 
Old December 16th, 2004, 03:18 AM
Authorized User
 
Join Date: May 2004
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Changing the security level it's working for me, but I use Office 2000 package.

Try the second method, described yesterday.

Good Luck!
Mihai






Similar Threads
Thread Thread Starter Forum Replies Last Post
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
New to Excel VBA anukagni Excel VBA 0 June 24th, 2006 05:51 AM
Converting excel data to Access using excel VBA ShaileshShinde VB Databases Basics 1 April 26th, 2006 07:57 AM
Excel VBA to SQL & back to VBA edesousa Excel VBA 1 June 1st, 2004 02:39 AM
Excel with VBA myquestq Excel VBA 1 November 7th, 2003 05:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.