Identify The Opened .xls
Mar 30, 2007I am using ADO connections in my program to insert the datas in the excel. I want to find if the excel is locked by another user. How do i do this in ADO commands.
View 6 RepliesI am using ADO connections in my program to insert the datas in the excel. I want to find if the excel is locked by another user. How do i do this in ADO commands.
View 6 RepliesIs there a way to create an outside log of who has opened an excel file and when?
I am looking to add some accountability to a project.
I have macro enabled workbooks that the contract number increases by one everytime they are opened. Is there a way to make it auto save though when its opened. Right now I have to click save as soon as I open it. If I do not do this when I open it, when I open it again the contract number will stay the same as it was, because I save it at the end after I put all customer info in.
View 8 Replies View RelatedI want my macro on the IR Tracker sheet to run once workbook is opened. Is this possible?
I have attached the workbook for better understanding.
Is it possible to insert the filename automatically in formula after the input from the user?
I want to ask the user to input a filename and afterwards, call that filename in an Index-Match
I have the below formula with the sample filename:
ActiveCell.FormulaR1C1 = _
"=INDEX('[filename1.xlsx]DATA'!C9,MATCH(RC[1],'[filename1.xlsx]DATA'!C32,0))"
Range("A2").Select
How do I get one sheet to update from the other when I open both sheets. Somethign like an auto update. If I had two tabs on the same spreadsheet I would just use = but I can't use that with two different sheets.
View 3 Replies View RelatedI've started this thread a few weeks ago but didn't get any answers on how to solve the problem or if it was even possible to solve. I would like to know if is possible to set a reference to a NOT OPENED workbook. All the code I've tried so far didn't get me anywhere:
View 3 Replies View RelatedOpening it manually the dates in column C are all consistently date numbers. i.e. using the =ISNUMBER() function to test them, they all return True
However when I include the VBA instruction:
While using an userform, is it not possible to swap to other files in the window?
I.e Alt+tab function is not working while an userform is opened.
I have 3 Work books - one (WB1) checks its version number against an online record and if they dont match it opens WB2 which then proceeds to download the updated version copy information from WB1 to its self which it then pastes into WB3
WB1 then gets deleted and WB3 Renamed to the old name of WB1
the issue i have is when i open WB2 using the button that also checks for updates on WB1.
WB2's code seems to just stop when it gets to the point of updating WB3 no error messages or nothing it just stops!
NewMasters(2).xls = WB1
Updater.xls = WB2
NewVersion.xls = WB3
There are a lot of worksheets with a lot of similar data from which I have to determine the threshold. So if possible I would like to create a macro.
I want to know the threshold value when Y=2.
The threshold can be between different Input Values (=Stimulus Intensity (ľA)).
For example: the threshold of amp P2-N1 & P3-N3 lies somewhere between 200 and 252ľA. The threshold of P1-N1 lies somewhere between 318 and 400ľA.
Is it possible to determine the threshold value with a formula?
I would like to have a message box pop up when a file is opened requiring a user to enter information (Name), that would then put this name into a cell for later use when they are printing.
View 6 Replies View RelatedI am looking for a way to have Excel zoom to 120% whenever any workbook is opened. (My boss has poor eye sight...)
I set up a simple Macro
Code:
Sub Auto_Open()
ActiveWindow.Zoom = 120
End Sub
but I get an error that says "Run-time error '91': Object Variable or With block variable not set.
i'm trying to find out how i can determine if a template (.xlt) has been opened.. the name of the file generated is dynamic, and increments by 1 for each open count. this limits me from using an isWorkBookOpen() function, since i do not know the name, and my project does not allow me to save the file file before hand..
my thought was to set the .name value to the workbook object holding the template.. and then check to see if a workbook with that name is open.. but alas.. .name is readonly
how can i check to see if the template file is already open?
I have excel vba code to open .xls files on my server. Files to open are chosen by the user via a UserForm within my app, it shows them all their files in their directory on my server. How can I open their files (.xls) that they select but DISABLE the VBA from being able to run/execute, if they have any attched to the file?
I now have all code in place to open the file no problem, I just need to know how to disable the VBA part from being "turned on" when the file opens.
Is there any way to access all the applications which are opened through only Excel.. Like creating a menu which will list all applications that are running.. like Word., other excel workbooks,Notepads etc?
I run a macro which runs saves the active file to a different location to ensure that I retain the original like so -
If ActiveWorkbook. Name = "KEY_DATA_CFT77" + ".xls" Then
ActiveWorkbook.SaveAs Filename:= _
"H:HOME imcEXCELKEY_DATA_2006KEY_DATA_2006_01KEY_DATA_CFT77_01.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
End If .................................
Is it possible to write code that can identify how a workbook has been opened i.e. has the workbook been opened by another workbook or has it received a double click event on the workbook itself.
If it is possible I would like to place the code in the open event of the workbook that is being opened.
An external program opens and closes Excel Workbook (OLE). What is the VBA code so when the WB is opened, Macro1 will run before OLE closes that Workbook?
View 6 Replies View RelatedI have 3 workbooks open, the main WB has my command button + code in it, and the other 2 were opened up using the existing code in my main workbook.
Using general code e.g( Thisworkbook, activeworkbook, workbooks(1)), how can I activate one out of the 3?
I know the main workbook can be accessed using "thisworkbook", but when I activate it, I can't activate one of the others in my next line of code using activeworkbook.activate, or workbooks(1).activate.
I need to know when excel opened. Is there a way to tell this?
View 7 Replies View Relatedi'm tyring to formulate a do loop that will basially loop until the workbook is opened. here is my code...
'CHECK IF OPENED WORKBOOK EXISTS
Dim myBook As Workbook
On Error Resume Next
Set myBook = Application.Workbooks(vCriteria & "ISPR.XLS")
On Error Goto 0
what i want is for it to loop until myBook is <> nothing... but i'm not sure how to do that.
the small code i'm writing just needs to do the following:
1. open an .xslx file selected by the user
2. copy 2 worksheets from that file to the current one
3. close the selected file without saving it.
This is my code:
VB:
Sub GetData()
MsgBox ("Please select a file"), vbOKOnly
Master = Application.GetOpenFilename(FileFilter:="Excel Files (*.xlsx), *.xlsx", Title:="Please select a file")
[Code]....
Opening the file works, but the last 3 lines don't because i don't understand how to declare "Master": however i dim it (workbook, object, variant...) i get an error on the GetOpenFilename line. If i don't declare it, i get an error while trying to copy the worksheets.
I have made a league table which pulls data from another table - in this example. The actual one i am using pulls data from a different workbook. Any way...In one of my columns i am using the countif formula to count how may times an advisor's name appears. Eg - =COUNTIF(A:A,"Sally A").
Is there another formula i can use to carry out this function. The reason i am asking this is there are multiple links in my league table to the other workbook. Once i open my league table all the data is updated - as the other workbook data is changed. However, for this to work i need to open up the other workbook where the data is , otherwise i will get the VALUE# error. I do not want to open the other workbook just to pull the data over, i need this league to automatically update once opened.
I have an excel file on a share site which is accessed by several people. The first tab is set up as a home page which directs the person to the relevent part of the work book that they need. My problem is that as the person saves their updates it also saves the location of the workbook they were in. I want it to return to the " homepage" automatically each time it is opened.
View 5 Replies View RelatedI have a little issue with a list-box. When i open my workbook and i click on the List Box the list box freezes, excel doesn't let me select it until i go to design mode, select the list box then close out of design mode. This sort of "fixes" the issue but i would rather not do so this way.
View 2 Replies View RelatedI would like excel to adjust to a certain size when the program is opened using vba. Not to equal the computer monitor size but only the size i choose (as it is almost square).
View 3 Replies View Relatedmy workbook is finally working the way it should but every time i open it i get a security warning window with the options disable macros, enable macros and more info. how do i get this to not show up every time it's opened. this workbook will be used by someone other than me and i don't want them to need to do anything but open it and use it.
View 8 Replies View RelatedI want to show the name of opened workbooks in the list box, but the following code does not work.
for example, I opened 'a1.xls' and 'a2.xls'. The listbox of 'main.xls' should show their file name.
The Macro asks the user to point at the location of a report, it then copies information out of that report and pastes it into a master sheet. The part I am having trouble with is closing the file that data has been copied from.
I have tried different things to close it such as