Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Saint: A dead sinner revised and edited. -- Ambrose Bierce


devel / comp.databases.ms-access / Re: Bring Excel window to foreground

SubjectAuthor
* Bring Excel window to foregroundKeith Tizzard
+* Re: Bring Excel window to foregroundRon Weiner
|`- Re: Bring Excel window to foregroundKeith Tizzard
`- Re: Bring Excel window to foregroundRon Paii

1
Bring Excel window to foreground

<72706973-1864-4ed0-b6f6-07c32c041ed4n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=539&group=comp.databases.ms-access#539

  copy link   Newsgroups: comp.databases.ms-access
X-Received: by 2002:ac8:57c2:: with SMTP id w2mr50047046qta.54.1638275196562;
Tue, 30 Nov 2021 04:26:36 -0800 (PST)
X-Received: by 2002:aca:af42:: with SMTP id y63mr3671743oie.167.1638275196405;
Tue, 30 Nov 2021 04:26:36 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.databases.ms-access
Date: Tue, 30 Nov 2021 04:26:36 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=88.106.51.142; posting-account=SKIztwgAAAD15rYh-v-27VVmHult5LKY
NNTP-Posting-Host: 88.106.51.142
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <72706973-1864-4ed0-b6f6-07c32c041ed4n@googlegroups.com>
Subject: Bring Excel window to foreground
From: internet...@foobox.com (Keith Tizzard)
Injection-Date: Tue, 30 Nov 2021 12:26:36 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 21
 by: Keith Tizzard - Tue, 30 Nov 2021 12:26 UTC

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.

Re: Bring Excel window to foreground

<so5d83$hh5$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=540&group=comp.databases.ms-access#540

  copy link   Newsgroups: comp.databases.ms-access
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: rw...@domain.com (Ron Weiner)
Newsgroups: comp.databases.ms-access
Subject: Re: Bring Excel window to foreground
Date: Tue, 30 Nov 2021 09:42:07 -0500
Organization: WorksRite
Lines: 30
Message-ID: <so5d83$hh5$1@dont-email.me>
References: <72706973-1864-4ed0-b6f6-07c32c041ed4n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Nov 2021 14:42:11 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="9073617223c0dada454bf8405cc4c7be";
logging-data="17957"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0eMRbBaO8mQ/U5JhFRvXw"
Cancel-Lock: sha1:+Hx96ls9+YE/4S+zuepNuNHALkk=
X-Antivirus-Status: Clean
X-Newsreader: MesNews/1.08.06.00-gb
X-Antivirus: AVG (VPS 211130-0, 11/29/2021), Outbound message
X-ICQ: 1701145376
 by: Ron Weiner - Tue, 30 Nov 2021 14:42 UTC

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

Re: Bring Excel window to foreground

<6efed39d-1d0b-4720-b6d7-34b8b39c38afn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=541&group=comp.databases.ms-access#541

  copy link   Newsgroups: comp.databases.ms-access
X-Received: by 2002:ad4:5aa4:: with SMTP id u4mr209653qvg.7.1638288592085; Tue, 30 Nov 2021 08:09:52 -0800 (PST)
X-Received: by 2002:a05:6830:449e:: with SMTP id r30mr219943otv.120.1638288591819; Tue, 30 Nov 2021 08:09:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.databases.ms-access
Date: Tue, 30 Nov 2021 08:09:51 -0800 (PST)
In-Reply-To: <72706973-1864-4ed0-b6f6-07c32c041ed4n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=65.30.79.18; posting-account=RurhpQoAAACBjKrwaxvElRMdPO3AZiPP
NNTP-Posting-Host: 65.30.79.18
References: <72706973-1864-4ed0-b6f6-07c32c041ed4n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6efed39d-1d0b-4720-b6d7-34b8b39c38afn@googlegroups.com>
Subject: Re: Bring Excel window to foreground
From: ron81...@gmail.com (Ron Paii)
Injection-Date: Tue, 30 Nov 2021 16:09:52 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 27
 by: Ron Paii - Tue, 30 Nov 2021 16:09 UTC

On Tuesday, November 30, 2021 at 6:26:38 AM UTC-6, Keith Tizzard wrote:
> 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.

Assuming you use "CreateObject" to open Excel.
i.e. Set excelobj = CreateObject("Excel.Application")

The only difference I see from my code is I set the spreadsheet visible to true at the end.

Re: Bring Excel window to foreground

<a072b22f-d8ba-44bd-9270-efb6d2d294e8n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=542&group=comp.databases.ms-access#542

  copy link   Newsgroups: comp.databases.ms-access
X-Received: by 2002:ac8:5c45:: with SMTP id j5mr6149521qtj.58.1638358803791;
Wed, 01 Dec 2021 03:40:03 -0800 (PST)
X-Received: by 2002:a05:6808:3ab:: with SMTP id n11mr5439609oie.145.1638358802351;
Wed, 01 Dec 2021 03:40:02 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.databases.ms-access
Date: Wed, 1 Dec 2021 03:40:02 -0800 (PST)
In-Reply-To: <so5d83$hh5$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=88.106.51.142; posting-account=SKIztwgAAAD15rYh-v-27VVmHult5LKY
NNTP-Posting-Host: 88.106.51.142
References: <72706973-1864-4ed0-b6f6-07c32c041ed4n@googlegroups.com> <so5d83$hh5$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a072b22f-d8ba-44bd-9270-efb6d2d294e8n@googlegroups.com>
Subject: Re: Bring Excel window to foreground
From: internet...@foobox.com (Keith Tizzard)
Injection-Date: Wed, 01 Dec 2021 11:40:03 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Keith Tizzard - Wed, 1 Dec 2021 11:40 UTC

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

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor