Can i keep my Excel page always on top? Any idea?

mtheriault2000

Well-known Member
Joined
Oct 23, 2008
Messages
826
Hello to all

Any idea on how i could keep my Excel sheet always on top of others. I produce some calculated data that i need to traspose to another web application. A fastudious operation to go back and forth.

I did try Deskpin and File Box Extender. Didn't seem to work with Excel. Did wok for a web page.

I'm using Windows 7 and Excel 2007

Any help greatly appreciated
Martin
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Re: Can i keep my Excel page always on top? Resolve

Hello

I finally resolve the problem from a solution that i found on the net. Using it, my Excel sheet stay on top of all other application

Original post
http://www.xtremevbtalk.com/showthread.php?t=307317

My slightly modified code

Code:
Option Explicit
Public Ontop As Boolean
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _
   ByVal hwndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
   ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Sub TestShowXLOnTop()
    If Ontop = False Then
        Ontop = True
        RANGE("R_Ontop") = "T"
        ShowXLOnTop True
    Else
        Ontop = False
        RANGE("R_Ontop") = ""
        ShowXLOnTop False
    End If
End Sub
Public Function ShowXLOnTop(Ontop As Boolean)
Dim hXL As Long, setting As Long
If Ontop Then setting = HWND_TOPMOST Else setting = HWND_NOTOPMOST
hXL = Application.hwnd
SetWindowPos hXL, setting, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVE
End Function
Sub TestShowXLNormal()
ShowXLOnTop False
End Sub

Martin
 
Upvote 0

Forum statistics

Threads
1,223,298
Messages
6,171,289
Members
452,394
Latest member
DARVIN256

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top