Re: What are you listening to? Community Center Geeks' Lounge by data recpver mayday.... Re: Windows Service Pack 2 - Necessary? Hardware and Software Microsoft Windows by Catweazle MayDay, Service Pack 2 replaces just about all the files that … The botnet stripped naked and exposed Hardware and Software Networking by happygeek … sale is also a lucrative criminal business." Storm and Mayday are covered in some detail in this analytical article, and… Amazon Fire Phone stunning Features(Programming or Hardware?)!!! Hardware and Software Hardware Mobile and Wearables by oanahmed … some features especially the ***Dynamic Perspective***, ***Firefly Technology*** and the ***Mayday***. I was curious to know about how these features have… Re: Jokes Community Center Geeks' Lounge by almostbob … who lost communications was on a cellular phone and yelled “Mayday, Mayday!! The pilot had an instant and fatal heart attack. I… down at 18,000 feet and traveling at 180 mph. Mayday, Mayday!!” The employee in the tower had put him on speaker… Re: why google is not indexing all pages of my website.. Digital Media Digital Marketing Search Engine Strategies by jay 11 …;[URL="http://searchengineland.com/google-confirms-mayday-update-impacts-long-tail-traffic-43054"]Mayday[/URL]" update. I have personally… Re: How to cancel negative values? Programming Software Development by K0ns3rv Anyways switch statments are easy to understand. For your code it would be like this. [CODE] get variable(cin) switch(variable) { case 1: circle e.g break; case 2: rectangle e.g break; triangle e.g break; default: print "0 or other invalid value MAYDAY OMG ". break; [/CODE] //k0ns3rv Re: Labor Day USA Community Center Geeks' Lounge by Agilemind I heard Labour Day was moved from Mayday to undermine worker solidarity in North America. Re: Who is your historical hero? Community Center Geeks' Lounge by star126 ashin. mayday. their songs inspire me live , work. play happily. not to waste our youth/ ❤ Re: Offline Installation Hardware and Software Linux and Unix by NewbieChameleon … I checked the ToC for Archive. Is this an issue? MayDay! MAYDAY - Close An Already Open File Programming Software Development by get connected Hi all. I am having issues with people not closing an important file in excel. I have a new vb.net based application that i want to close the excel file when i prompt it to. The application checks for specific named files in a hidden folder on a timer event, (that all works fine) how do i tell it to close a file that is already open. All … Re: MAYDAY - Close An Already Open File Programming Software Development by Fungus1487 Im not sure you will be able to check if excel has a specific file open but you could easily close all Excel instances from your application with something along the lines of. [CODE=VB] Dim instances() As Process = Process.GetProcessesByName("EXCEL.EXE") For Each instance As System.Diagnostics.Process In instances instance.Kill() … Re: MAYDAY - Close An Already Open File Programming Software Development by get connected Thanks for that as a solution, the only issue i have there is two of the main people causing the problem usually have multiple spreadsheets open and also leave their desk on a regular basis. So shutting down everything would cause an issue, then when they are away from their desk they would not be able to allow closure. Is it not possible to do … Re: MAYDAY - Close An Already Open File Programming Software Development by Fungus1487 Nope. A process is just a pointer. Same as your processes tab in task manager. There may be a way using the process Id to connect to live instances of excel. Ill take a quick look. Re: MAYDAY - Close An Already Open File Programming Software Development by get connected Ok I've been looking at this in a new way. Is it possible to say something on the lines of [CODE] Dim wbName as String = "Book1.xlsm" Dim wbBook As Microsoft.Office.Interop.Excel.Workbook For Each wbBook In Process.GetProcessesByName("excel.exe") If wbBook.Name = wbName Then wbBook.Activate() Exit Sub End If [/… Re: MAYDAY - Close An Already Open File Programming Software Development by Fungus1487 You will need to check the exact instance name under the processes tab in task manager, it will be something like EXCEL.exe As with your posted code there is no way to cast from a Process to an Application instance. The Workbook is a wrapper around the api calls required to talk to excel whilst the Process is just a pointer that an Application is … Re: MAYDAY - Close An Already Open File Programming Software Development by lolafuertes The approah to find the running processes is good to know if there is an excel instance running. Else every thing is OK. I there is one (or more) running instance(s), The VisualBasic namespace offers the getobject method to get an instance of the running program. No matter wich one. Once acquired, you should forcibily close any open workbook,… Re: MAYDAY - Close An Already Open File Programming Software Development by get connected Thanks for all the looking Fungus1487 it has been very much appreciated. I will continue to battle on with this annoying issue - if only stupid end users would simply learn to close a workbook. LOL...... If at some point you find anything that may help please do let me know. Lolafuertes - i would forcebly close all instances of excel - however to… Re: MAYDAY - Close An Already Open File Programming Software Development by get connected Fungus1487 you are a genious. I just tried the following...... [CODE] Private Sub Button1_Click() Handles Button1.Click Dim WORKING = Interaction.GetObject("C:\Documents and Settings\username\Desktop\Book1.xlsm") WORKING.close(False) End Sub [/CODE] this closes the workbook and only the workbook - it leaves the excel application … Re: MAYDAY - Close An Already Open File Programming Software Development by get connected OK here we go again... Interaction.GetObject is also causing my system to open the file if it is not already open. - This could cause a knock on effect - so although if it is open it closes it, i still need to be able to determine whether or not it is open on the pc - any ideas??? Re: MAYDAY - Close An Already Open File Programming Software Development by RDSchaefer Why are you going through all this effort for 2 people? This is more of a mgt issue than a coding issue. Re: MAYDAY - Close An Already Open File Programming Software Development by get connected I agree this is more of a management issue than a code issue - however the two people causing most of this head ache are management. They excuse themselves from any and all wrong doing by staiting that they deal with so much on a daily basis that shutting a spreadsheet doesn't rank highly on a to do list when leaving their desks or in most cases … Re: MAYDAY - Close An Already Open File Programming Software Development by lolafuertes Normally, when an excel file is open, a file starting with ~$ and the name of he workbook exists on the same directory where the workbook exists. You can easely chek if thei file exists with a [CODE]Dim MyFile as new System.IO.FileInfo("~$Book1.xslm") If MyFile.Exists Then ' ' Close it here ' End If[/CODE] Hope this helps Re: MAYDAY - Close An Already Open File Programming Software Development by zinnqu There is a simple solution to this all together. Add a timer into the workbook that auto-closes the workbook after x time of inactivity. here is the code to add to the VBA side of the workbook to fix the issue [CODE] 'Set Timer Private Sub Workbook_Open() EndTime = Now + TimeValue("00:10:00") RunTime End Sub 'reset timer with … Re: MAYDAY - Close An Already Open File Programming Software Development by get connected Thanks for that lolafuertes i will look at that code to see if it helps out. Zinnqu - much as i appreciate the response if you read through my postings you will notice that i have actually built a timer event into the workbook set for a 3 minute countdown, there is also a secondary timer function that kicks in when the pc has had no input for 5 … Re: MAYDAY - Close An Already Open File Programming Software Development by zinnqu For some reason, when I posted this yesterday, your comment about the timing was not there. So I apologize for that. The other way to fix the workbook is to PW protect the VBA side of the document. Changes to the code are not permitted, and the document is allowed to be edited. Remote closing a file is harder since the ~$ precedes the file name, … Re: MAYDAY - Close An Already Open File Programming Software Development by get connected Zinnqu - I have password protected and file name safety macros built in to all my work - eg (below is for demo only) file path / file name / file extension <> what they should be then msgbox" this is not an official file and will be terminated" file.close with a daisy chain condition to log and kill(file) once closed. I am not … Re: MAYDAY - Close An Already Open File Programming Software Development by zinnqu Trying to see if I follow the thread here... You have an application that opens the excel doc. The doc is on a network drive space. There is many people using your front end program to open this document. If this is all correct, then try to create dll. The Dll will have a capture log. This log will contain, username, and time opened. Then have the… Re: MAYDAY - Close An Already Open File Programming Software Development by get connected Almost - Any user can open the excel document (only one user at a time) - macro takes care of that. My new application is used by all users but does not open the excel file - i want to use this application to close the excel file if the user has it open. I use a hidden file structure to send update links between users on the application so can … Re: MAYDAY - Close An Already Open File Programming Software Development by Fungus1487 Well could you not perform the following... [CODE=VB] Dim workbook As String = "C:\MyWorkBook.xls" Dim isOpen As Boolean ' The method should try to open your workbook, if failure then return true isOpen = CheckIsWorkbookOpen() While isOpen Interaction.GetObject(workbook).close(False) ' Force garbage collection GC.…