Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.access.formscoding,microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul wrote:
| I'm using Automation to open and populate fields in an Excel workbook | from Access. The code I'm using is: | | Function open_file_in_Excel(strFileSpec As String, intPopulate As | Integer) Dim appExcel As Excel.Application | Dim wbk As Excel.Workbook | Dim wsht As Worksheet | Set appExcel = CreateObject("Excel.Application") | Set wbk = appExcel.Workbooks.Open(strFileSpec) | appExcel.Visible = True | | At this point, I've got the workbook open, and I would like to | capture the name of the Active Worksheet. I've tried various | combinations like | | Set wsht = Workbooks(strFileSpec).ActiveSheet.name | Set wsht = Application.Workbooks(strFileSpec).ActiveSheet Set wsht = appExcel.Workbooks(1).ActiveSheet or: Set wsht = appExcel.ActiveSheet -- KN |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Capture Worksheet Change Value | Excel Programming | |||
In a range of months can I capture the most current month entry? | Excel Discussion (Misc queries) | |||
Capture current WS Name? | Excel Programming | |||
Capture a worksheet in VBA | Excel Programming | |||
Capture Current Selection in a Combo Box | Excel Programming |