Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Working with Excel.Application interferring with Excel work

Avatar of bejhan
bejhan asked on
Microsoft Access
6 Comments1 Solution522 ViewsLast Modified:
I modify some excel files programatically through MS access using the Excel.Application object.

I am finding that this is interferring with the user's excel work. Is there anyway I can stop this interference.

Here is a sample of some things I do to an excel file.
Dim excApplication As Excel.Application

    Set excApplication = CreateObject("Excel.Application")
    excApplication.Workbooks.Open strQueryPath
    
    With excApplication.Application
        .Sheets(strSheetName).Select
                            
        .Rows("1:1").Select
        With .Selection
            .Font.Bold = True
        End With
        
        .Columns("K:K").Select
        With .Selection
            .NumberFormat = "_(* #,##0.00_);_(* (#,##0.00);_(* ""-""??_)"
        End With

        .Cells.EntireColumn.AutoFit
        
        .Sheets(strSheetName).Name = strNewSheetName
    End With
    
    excApplication.Application.ActiveWorkbook.Save
    excApplication.Quit
    Set excApplication = Nothing