Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formatting Excel from an ACCESS MODULE
I ahve tried posting this in the Access Module forum buit they told me to try here. Please note that I writing the VB code in an ACCESS Module not directly in EXCEL... Thanks in advance for your help! Here's a problem I have been stuck on for the last three months. I have a lot of VBA code in an access module that creates queries and tables. At the end of the code, I transfer all this information to an excel spreadsheet using the transfer spreadsheet option. I then have a batch of code which opens the spreadsheet, formats it, saves it and closes it. It works like a dream. However, the code is currently telling the excel spreadsheet to select collumns K and L and turn the whole columns pink. What I actually want is the code to search through columns K and L and turn an individual cell pink if the value is NO. Does this mean I have loop around each cell? How do I do this - i cant find any otherexamples on the net!! Any help or suggestions greatly appreciated. Here's the current code: Dim xlApp As Object Dim StrPath As String StrPath = "H:\Census_Checking\FSM_TO_BE_CHECKED.xls" Set xlApp = CreateObject("Excel.Application") xlApp.Visible = True With xlApp ..Workbooks.Open Filename:=StrPath ..Columns("K:L").Select With .Selection ..Interior.ColorIndex = 7 End With End With With xlApp ..Cells.Select ..Cells.EntireColumn.AutoFit ..Rows("1:1").Select ..Selection.Font.Bold = True End With xlApp.Application.ActiveWorkbook.Save xlApp.Quit |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro in excel to call a access module to run. | Excel Discussion (Misc queries) | |||
Reference Class Module in Access from Excel | Excel Programming | |||
Running Excel module within Access | Excel Programming | |||
Query a Access database that has a module from Excel | Excel Discussion (Misc queries) | |||
how to call Access function&module in Excel VBA?? | Excel Programming |