Shortcut related to macro working outside Excel
I have one question, let´s supposed I work on several workbooks in Excel and I minimize them all to work on other applications outside Excel...
Then I want to come back to the last workbook in Excel I minimized, could we create a macro which works outside Excel via a shortcut (for example clt+E) which allows us to do that?
Through internet I found this macro (please see VBA code below) but it works only if I am already inside Excel (I tried to allocate a shortcut Clt+E). Indeed it does not work outside Excel, I mean if all my Excel Windows are minimized at the Level of my taskbar Windows, the shortcut will not work.
If someone knows the solution by chance, it would be really fantastic. Thanks in advance. Xavi
Sub OpenWorkbook_78() Application.WindowState = xlMaximized 'maximize Excel ActiveWindow.WindowState = xlMaximized 'maximize the workbook in Excel
See also questions close to this topic
using hash(#) in vba
Can someone clarify why I have to use a # here?
#If Win64 Then do something #Else do something else #End If
- need to merge 3 columns in excel
Code Runs Only If Visual Basic Editor is Open
I have a really weird problem about VBA. I tried to list circular references at activeworkbook and i have written below code for that. It only works if i press ALT+F11. So if VBA Editor window is open, code runs correctly but otherwise it is not working. By the way, code is in a module at Addin and i call it from ribbon. You may see the code below. Your help is highly appreciated.
Type SaveRangeCir Val As Variant Addr As String Preaddress As String Shtname As String Workbname As String End Type Public OldCir() As SaveRangeCir Sub DonguselBasvurulariBul(control As IRibbonControl) Dim wba As Workbook Dim ws As Worksheet Dim wsa As Worksheet Dim sht As Worksheet Dim sht2 As Worksheet Dim dummy As Worksheet Dim Item As Range Dim crcell As Range Dim cll As Range un = "Sayin " & Environ("UserName") muyarcirc = MsgBox("Lutfen Oncelikle Dosyanizi Kaydedin" & vbNewLine & vbNewLine & _ "-->> Dosyanizi Kaydettiniz mi?", vbExclamation + vbYesNo, un) If muyarcirc = vbno Then muyar2 = MsgBox("Dongusel Basvuru Arama Islemi Iptal Edildi", vbInformation, un) Exit Sub End If With Application .DisplayAlerts = False .ScreenUpdating = False .EnableEvents = False End With On Error Resume Next Set wba = ActiveWorkbook Set wsa = wba.ActiveSheet Worksheets.Add Set dummy = ActiveSheet For Each sht2 In wba.Sheets If sht2.Name = "Dongusel Basvurular" Then sht2.Delete End If Next sht2 wba.Worksheets.Add Set ws = wba.ActiveSheet dummy.Delete With ws .Name = "Dongusel Basvurular" .Range("A1") = "Dongusel Basvuru Hucresi" .Range("B1") = "Dongusel Basvuru Hucresi Formul Degeri" .Range("C1") = "Bagli Oldugu Alan" .Range("D1") = "Bulundugu Sayfa" .Range("E1") = "Bulundugu Dosya" End With With wba For Each sht In .Worksheets If sht.CodeName <> ws.CodeName Then sht.Activate crcell = Nothing Do Set crcell = sht.CircularReference If Not crcell Is Nothing Then ReDim Preserve OldCir(1 To crcell.Precedents.Cells.Count) i = 0 For Each cll In crcell.Precedents i = i + 1 OldCir(i).Addr = cll.Address OldCir(i).Val = cll.Formula OldCir(i).Preaddress = cll.Precedents.Address OldCir(i).Shtname = cll.Parent.Name OldCir(i).Workbname = cll.Parent.Parent.Name cll.Value = cll.Value Next cll For j = LBound(OldCir) To UBound(OldCir) lr = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row ws.Cells(lr, 1) = OldCir(j).Addr ws.Cells(lr, 2) = "'" & OldCir(j).Val ws.Cells(lr, 3) = OldCir(j).Preaddress ws.Cells(lr, 4) = OldCir(j).Shtname ws.Cells(lr, 5) = OldCir(j).Workbname ws.Hyperlinks.Add Anchor:=ws.Cells(lr, 1), Address:="", SubAddress:=ws.Cells(lr, 4) & "!" & ws.Cells(lr, 1), _ ScreenTip:="Dongusel Basvuru Hucresini Gormek icin Tiklayiniz" Next j Else GoTo skipsheet End If Erase OldCir Set crcell = sht.CircularReference Loop While crcell.Cells.Count > 0 lr2 = ws.Cells(Rows.Count, 1).End(xlUp).Row For m = 2 To lr2 If ActiveSheet.Name <> ws.Cells(lr2, "D") Then wba.Sheets(ws.Cells(m, "D")).Activate End If Range(ws.Cells(m, 1)).Formula = "=" & Right(ws.Cells(m, 2), Len(ws.Cells(m, 2)) - 1) Next m End If skipsheet: Next sht If ws.Range("A2") = "" Then ws.Delete wsa.Activate m1 = MsgBox("Aktif Dosyada Dongusel Basvuru Bulunamadi", vbInformation, "Sayin " & Environ("UserName")) Else ws.Activate ws.Range("A1:E1").EntireColumn.AutoFit End If End With Erase OldCir Set crcell = Nothing With Application .DisplayAlerts = True .ScreenUpdating = True .EnableEvents = True End With End Sub
True last column in VBA
So i have this working but some days the data in Column P is blank then the "Last Column" stops at P when actually the last column could be S or T or what ever. Here is what i have so long:
Sub trledSCB() ActiveSheet.ListObjects("MItrled").Range.AutoFilter Field:=1 ActiveSheet.ListObjects("MItrled").Range.AutoFilter Field:=1, Criteria1:= _ "836553196" lastCol = ActiveSheet.Range("b4").End(xlToRight).Column Lastrow = ActiveSheet.Cells(4, 1).End(xlDown).Row ActiveSheet.Range("b4", ActiveSheet.Cells(Lastrow, lastCol)).Select End Sub
I hope you guys can help me here?
How do i navigate to search keyword occuring above current line in eclipse?
In visual studio, I used to use chrl+shift+f to navigate to keyword occurrence above the current line. How do I do that in eclipse?
Open a file in VSCODE from keyboard
I am just testing VSCODE. I want to open a file from the keyboard. To my surprise it is a bit difficult. Try this:
- Ctrl-O (Opens the file dialog. This puts cursor focus in the "File name" field.)
- Shift-Tab (To try to go backwards to the list of files.)
At this point I am stuck. Cursor focus is now not in the list of files, but in the headings above it. If I try Tab I just get back to the "File name" field.
How do I go to the list of files with the keyboard?
UPDATE: This is on Windows 10.
UPDATE 2: Issued a bug report, https://github.com/Microsoft/vscode/issues/63260
How to expand a related table in MS Access using the keyboard?
How can I expand the related table using the keyboard only?
Do I have to click
+using the mouse every time?