Groups | Search | Server Info | Login | Register
Groups > comp.databases.ms-access > #14410
| Newsgroups | comp.databases.ms-access |
|---|---|
| Date | 2021-12-01 03:40 -0800 |
| References | <72706973-1864-4ed0-b6f6-07c32c041ed4n@googlegroups.com> <so5d83$hh5$1@dont-email.me> |
| Message-ID | <a072b22f-d8ba-44bd-9270-efb6d2d294e8n@googlegroups.com> (permalink) |
| Subject | Re: Bring Excel window to foreground |
| From | Keith Tizzard <internet.shopping@foobox.com> |
Thanks. That works a treat. Just what I wanted On Tuesday, 30 November 2021 at 14:42:15 UTC, Ron Weiner wrote: > on 11/30/2021, Keith Tizzard supposed : > > 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. > I believe you can use the VBA command AppActivate to do this. > > AppActivate Application.Caption > > Rdub
Back to comp.databases.ms-access | Previous | Next — Previous in thread | 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