Groups | Search | Server Info | Login | Register
Groups > comp.databases.ms-access > #14407
| Newsgroups | comp.databases.ms-access |
|---|---|
| Date | 2021-11-30 04:26 -0800 |
| Message-ID | <72706973-1864-4ed0-b6f6-07c32c041ed4n@googlegroups.com> (permalink) |
| Subject | Bring Excel window to foreground |
| From | Keith Tizzard <internet.shopping@foobox.com> |
I create an Excel spreadsheet in VBA in Access the start of which is:
' Dim excelobj As Excel.Application
Dim excelobj As Object
Set excelobj = openExcel
With excelobj
.Workbooks.Add
.Visible = True
.ActiveWorkbook.Sheets(1).Select
.ActiveSheet.Name = "Invoice schedule"
.cells(1, 1).FormulaR1C1 = "Invoice Schedule Week Ending " & Format(Me.fromDate, "dd/mm/yyyy")
.cells(1, 1).Font.Bold = True
.cells(2, 1) = "Vehicle"
.cells(2, 2) = "Date"
.cells(2, 3) = "Contract number"
.cells(2, 4) = "Client"
All this works well. However I would like the Excel window to become the foreground window. How do I do this?
DoCmd.SelectObject does not handle this.
Back to comp.databases.ms-access | Previous | Next — Next in thread | Find similar
Bring Excel window to foreground Keith Tizzard <internet.shopping@foobox.com> - 2021-11-30 04:26 -0800
Re: Bring Excel window to foreground Ron Weiner <rw@domain.com> - 2021-11-30 09:42 -0500
Re: Bring Excel window to foreground Keith Tizzard <internet.shopping@foobox.com> - 2021-12-01 03:40 -0800
Re: Bring Excel window to foreground Ron Paii <ron81pai@gmail.com> - 2021-11-30 08:09 -0800
csiph-web