Takes Focus When Printing

Jan 8, 2009

I am running software that calls an Excel macro using DDE. The macro populates a sheet with information to be printed, then prints the sheet.

I would like for this to take place in the background with Excel never taking focus from the software that calls the Excel macro. Currently Excel some times takes focus from the software and some times does not. The macro also takes the information it prints and stores it to another sheet, but I don't think that's the culprit stealing focus from the other software.

View 7 Replies


ADVERTISEMENT

Printing Multiple Workbooks With Printing Preference As Landscape

Jan 15, 2012

I would like to know if there is a way to print several different workbooks at once but keeping my printing format which I would like to be Landscape and Fit to one page. Reason is simple as I work in a office where staff is handed in several jobs to do everyday. They finish the jobs and log all the info on the database. I log on to database and put all their daily diaries and because it is all over the place I have to go in each file and set printing preferences which takes an hour in the morning and hour in the evening. I could do with some sort of automation where all diaries are automatically printed in Landscape and Fit on one page.

View 2 Replies View Related

Printing / Not Printing Ranges Based On Cell Contents

Apr 11, 2008

I have a report that is generated from a manufacturing process that looks like the example below. the report is 40 pages long when all the data is printed. i am looking for a way to only print this range if a dimension is "out of tolerance". if the dimension is within tolerance, there is always the "garbage" text of plus and minus. if every row is "within tolerance" in the range the cells in the OutTol column would all contain the "garbage" text but it will not always be identical. so, in summary, actual OutTol values = print and all "garbage" = not printed.

NomActDevLoTolUpTolOutTol
Y-0.956-0.9480.008-0.0030.0030.005
Z-1.413-1.4130.000-0.0030.003---*|++++
DIA0.4220.4240.002-0.0030.006----|+*++
POS0.0160.0110.005

View 9 Replies View Related

Formula That Takes Value From Each Worksheet?

May 11, 2013

I am look for a formula that takes the value from each worksheet and enter this to a summary sheet. I do not what to use formula = then press the enter key when you have select the cell with value in.

View 1 Replies View Related

Looking For A Formula Which Takes The Value In D2 - Search It In Column A?

Jun 2, 2014

I attached an example excel sheet. I tried to figure out but could not get a way. I need a formula which takes the value in D2, search it in column A, if the value is in the list, type the corresponding result in E2.

View 7 Replies View Related

Workbook Takes Time To Open

Apr 10, 2009

i have a workbook that is only 345kb in size it takes ages to open and although it has lookups and retrieves data from the web it just seems like it shouldnt be so slow

i also keep getting a message at the bottom like this:-

calculating (1 processor ) thena %

View 9 Replies View Related

Copying Column With VBA Takes Forever

Feb 8, 2010

The workbook has two sheets, "user" and "analysis". I have this code in a button sub:

View 2 Replies View Related

Countif Formula Takes Forever

Oct 19, 2011

I have a formula as follows:- =COUNTIF(C$2:C2,C2)

The problem is I have to fire it down 35,000 rows and it takes forever and freezes the PC. Is there a VBA code that will do it quicker or do I have to put up with it?

View 3 Replies View Related

Dropdown Which Takes Value Of Other Column Automatically

Jun 20, 2014

I am trying to make a excel sheet in which i will first keep a big database of data which will have following columns

1. Serial no.
2. Product
3. Price

and there will be a different sheet where if i select a serial No from the dropdown , the product and price corresponding to the serial no will come automatically beside it in the same row.

View 2 Replies View Related

It Takes Two Clicks To Shut Down Excel

Dec 28, 2006

I have a workbook with a bunch of VB code in it.

I have this workbook and any other workbook open, but this workbook is not active. I click the X to shut down Excel. It calls the Workbook_BeforeClose event, then asks if I want to save my work (as it should). I select "Save All" and the shut down is aborted.

It never makes it to the Workbook_BeforeSave event.

I then click the X a second time, and I'm not prompted to save but the shut down proceeds with saving all and then closing Excel.

==> Why does it require a second click of the X?

If this workbook is active, all works fine.

I've commented out all event code. Didn't help.

I've deleted my commandbar menu before attempting to close.

The order in which the workbooks were opened doesn't matter.

What might I be doing in VB to cause this behavior?

View 9 Replies View Related

Takes Too Long ‘calculating Cells’

Aug 3, 2006

This code is taking way too long to display the actions that it executes. It didn’t used to be that way. I was wondering if anyone knows why this may be. The Excel file is large – over 8 MB.

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "N:N"
Dim Cmnt
On Error Goto ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If .Row > 3 Then
If Me.Cells(.Row, "N").Value = "" Or Me.Cells(.Row, "N").Value = "O" Or Me.Cells(.Row, "N").Value = "H" Then
Me.Cells(.Row, "A").Resize(, 26).Interior.ColorIndex = 0
End If
If Me.Cells(.Row, "N").Value = "C" And Me.Cells(.Row, "O").Value = "DR" Then
Me.Cells(.Row, "A").Resize(, 26).Interior.ColorIndex = 39
End If
If Me.Cells(.Row, "N").Value = "C" And Me.Cells(.Row, "O").Value = "HJB" Then
Me.Cells(.Row, "A").Resize(, 26).Interior.ColorIndex = 6
End If.....................................

View 3 Replies View Related

Attempting To Speed Up The Time It Takes The Macro To Run?

Jan 8, 2013

I have recorded 7 different macros and then combined them all into one macro to achieve one end result. I am not sure if you can just look at the codes to determine different ways to improve them or if you need the excel spreadsheet as well.

View 2 Replies View Related

Macro Code That Takes Average Of Next 24 Cells Down

Feb 4, 2013

I have this one query though in regards to loops.

I am trying to create a macro that can take the average of the the first 24 cells within a sheet, place the answer onto a cell in the next sheet (e.g. sheet2 in cell A1), then go back to the previous sheet, take the average of the next 24 cells within the sheet and paste the average of this new set in A2. I want to create a loop that will do this 365 times.

I have only managed to create the following code, however its only obtainning the average for the first set of 24 cells starting from B6 in sheet 1. I dont know how to use offsets that well....

VB:
Sub Oval1_Click()
For i = 1 To 365
Sheets("H1 - Riser Turret pressure").Select
Range("B4").Select
ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet1!R[2]C:R[25]C)"
Range("B4").Offset(1, 0).Select
Next i
End Sub

View 6 Replies View Related

Nested IF Formula That Takes Into Effect Many Variables

May 5, 2014

Basically I need a formula that takes into effect many variables. It needs to check a size, thickness, and material, to determine a cost...

1.5 O.D. - 16GA - 304SS = $X

but

1.5 O.D. - 18 GA - 304SS = $Y

and such.

The problem I have is not only am I not understanding a lot of Excel jargon, the data set is not in perfect "example" conditions.

O.D. is in N:N yet there are blanks between N(x) and N(y), GA is in O:O yet blanks between O(a) and O(b), and so on.

Here is what I have at the moment, it uses a second sheet to derive the cost based on the parameters. Please ignore the first few terms, they are used with this cost lookup to give me my final. There also may be incorrect syntax in this, but since I get a nesting error first, I really don't know.

=V7+(Q7*M7*(IF(N7=2=AND(O7=20)=AND(L7=304),’Steel Tube Cost WIP’!$DD$19,IF(N7=2=AND(O7=20)=AND(L7=316),’SteelTubeCostWIP’!$DD$20,IF(N7=2=AND(O7=20)=AND(L7=2205),
’SteelTubeCostWIP’!$DD$21,IF(N7=2=AND(O7=18)=AND(L7=304),’Steel Tube Cost WIP’!$DD$16,IF(N7=2=AND(O7=18)=AND(L7=316),’SteelTubeCostWIP’!$DD$17,IF(N7=2=AND(O7=18)=AND(L7=2205),
’SteelTubeCostWIP’!$DD$18,IF(N7=2=AND(O7=16)=AND(L7=304),’Steel Tube Cost
[Code] ......

Mentioning LOOKUP, can I even use it? I've attempted many times however it isn't going too well What can I do?

View 2 Replies View Related

A Function For Calculate The Cells Takes To Appear Each Element

May 15, 2008

I want to obtain from some elements the number of cells it takes to appear:
We have for example A,B,C, and D,
and they appear in the next order:

1A
2C
3D
4A
5D
6B
7C
8A
9A

What I want to know is how much last in appear each element.

1A1
2C2
3D3
4A3
5D2
6B6
7C5
8A4
9A1

For example, the first “A” last one in appear, but the next element “C” last two in appear. In the forth line again cames the “A”, then are three cells. The “C” was in the cell2, and cames again in the seventh cell, then it takes five cells. In the cells eight and nine are two “A”, then in the cell nine takes one cell in appear again.

View 10 Replies View Related

Code To Time How Long Macro Takes To Run

Mar 10, 2004

Any code I can stick into the end (plus maybe start) of a macro to display the length of time it took for the macro to run?

View 9 Replies View Related

Drop Down That Takes Me Where The Selected Item Is Found

Nov 21, 2006

I plan to place a drop down list (combo box) in a WS where I upon selection of one item from that list will move me to the place in the same WS where the item selected is to be found. Hyperlinks are a theory, but the WS is protected and will stay protected. A drop down is preferred.

I haven't worked with this topics for quite some time and might have forgotten some basics.

View 9 Replies View Related

Delete Rows With AutoFilter Takes Forever

Jun 18, 2009

I have 3 subs.

The 1st sub populates a series of sheets with data present in a master sheet called Overall. I'm using ADO because it's fast...

The 2nd sub loops through a range of criteria (also happen to be sheet names) and autofilters a range using the array items as the criteria. The filtered rows are then deleted (excluding headers).

The 3rd sub simply runs 1 and 2.

The 1st sub completes almost instantly.
The 2nd sub is also darn quick if I run it BEFORE the 1st (which is not as intended).

I have tried compliling both into a single sub and still the whole autofilter bit takes ages.

View 9 Replies View Related

VBA: Tally # Of Times A RTD Referencing Function Takes A Specified Value

Jul 31, 2009

I have a cell, lets call it A1, w/ an IF statement referencing another cell, which is a function of two values taken from RTD. A1 is either blank or reads "One." I want another cell to tally the # of times that A1 takes on the value "One."

The issue:
I've tried approaching this by using Worksheet_calculate and an IF/Then statement to add 1 each time Range("A1") = "One" however this doesn't work because it keeps adding 1 while A1 reads "One." The calculations seem to fire off every milisecond, so if "One" flashes for 0.5 seconds, I get 500, and if it flashes for 3 seconds, I get 3000. For both cases, I'd like it to just add 1.

View 9 Replies View Related

Check Length Of Time It Takes Macro To Run

Mar 16, 2007

I've done quite a bit of searching in the forum and online and haven't found anything that's generic and can be used at anytime.

What I'm looking for is a way or for code that tells you how long it takes a macro to run from start to finish, something that can be used to time any macro. I've seen some threads in the forum where people indicate that it took x amount of seconds for their macro to run but not sure how to do it.

View 9 Replies View Related

Index Small Formula Takes Forever To Save?

Sep 15, 2014

I have one data tab which constantly changes. (adding more products and corresponding volume/prices) For the lookup tab, I want to look up one value and return multiple values.

I have figured out an index array formula but it just calculates so slowly. My live file is about 8MB now. When I apply my formula, it takes forever to save.

View 7 Replies View Related

Function That Takes A Value Froma Cell And Then Totals The Row Up To That Point

Oct 6, 2009

I have a very long if function that takes a value froma cell and then totals the row up to that point.... Is it possible to make this shorter? I have tried to put a sum function in there but that also comes with the nested functions have been exceeded error message...

=IF($S$8=12,P11+O11+N11+M11+L11+K11+J11+I11+H11+G11+F11+E11,IF($S$8=11,O11+N11+M11+L11+K11+J11+I11+H 11+G11+F11+E11,IF($S$8=10,N11+M11+L11+K11+J11+I11+H11+G11+F11+E11,IF($S$8=9,M11+L11+K11+J11+I11+H11+ G11+F11+E11,IF($S$8=8,L11+K11+J11+I11+H11+G11+F11+E11,IF($S$8=7,K11+J11+I11+H11+G11+F11+E11,IF($S$8= 6,J11+I11+H11+G11+F11+E11,IF($S$8=5,I11+H11+G11+F11+E1,))))))))

This one stops short, as it should continue down to $s$8=1.

View 2 Replies View Related

Excel File Takes Long Time To Save

Jan 20, 2014

[URL]

Excel takes about 10 minutes in the saving process. When I say 10 minutes, I mean, the excel screen freezes (says not responding) for about 10 minutes, then it actually saves at the very end in the normal time any other file would take as you watch the progress bar go forward.

I know many of the common answers and have tried. reducing the calculation time (which in turn reduces the saving time).

But in my circumstance, the calculation takes a very reasonable amount of time, and you see the progress % going forward.

- I would say I have about 2000 rows, and 15 columns.
- They have sumifs formulas.
- They link to a different workbook.
- The workbook I am working on saves to the network
- the source of my sumifs are also in the same folder on the network
- the recalculation takes about 10 seconds at most
- i have turned off recalculate before saving, it is all on manual calcs

- when i hit save, there are no calcs being performed
- there are no macros in the workbook
- there are only about 2 names in the name manager
- then it freezes for about 10 minutes.
- then the progress bar starts moving then it saves.

What is it doing in those 10 minutes?

1 more item to note, when I break the links to the workbook and thereby removing the sumifs formulas, its a snap.

Why does the existence of the sumifs extend saving time? I would completely understand if it elongated calculation time, but if calculation is off, then why does it even worry about it when saving?

View 4 Replies View Related

Pass The Result To A Sub Which Takes An Array Of Dates As A Parameter

Dec 27, 2008

I delcare an array of dates and assign it with a function that returns an array of dates. Then I want to pass the result to a sub which takes an array of dates as a parameter. However, I am getting a type mismatch error on this line

View 2 Replies View Related

Frequency Formula Takes Long Time To Calculate

Feb 12, 2010

I am using the below formula to distinctly count the number of customers that match the criteria that I have in Cells C7 and B10. The data is in a separate worksheet, that I am showing Named Detail of which will be changing on a monthly basis, so a pivot table does not want to be used. The detail data ranges from row 7-40,000, and the file is currently 8610KB's, and can potentially grow.

=SUM(IF(FREQUENCY(IF(Detail!$A$7:$A$40000=C$7,IF(Detail!$B$7:$B$40000=$B10,IF(Detail!$D$7:$D$40000<> "",MATCH(Detail!$D$7:$D$40000,Detail!$D$7:$D$40000,0)))),ROW(Cust)-MIN(ROW(Detail!$D$7:$D$40000))+1),1))

This formula works but takes an excessive amount of time for one caluclation, and I need this for multiple column and row critera. So, can this calculation be changed in order to get the same result with faster calculation time? I am using Excel 2003.

View 6 Replies View Related

Inserting Lines, Takes Neighboring Formats But Not Formulas

Nov 15, 2008

I have a spreadsheet that I have people fill in. A few columns have VLOOKUPS. I want to allow people to insert lines in this spreadsheet and have the formula automatically copy in the new line. It seems to already have that behavior for formatting and conditional formatting. Is there a way to also have that for formulas when inserting lines?

Name City Assigned Salesman
-----------------------------------------------------
john Mountain View (formula using VLOOKUP)
cindy Palo Alto (formula using VLOOKUP)
ronnie sunnyvale (formula using VLOOKUP)
---------------------------------------------------

Insert line between john & cindy. Formula doesn't copy.

I ask them to copy the formula but they often forget. If I can make it a little more robust,

View 11 Replies View Related

Conditional Formula - Value Field Takes Max Of Other Four Columns And Returns String?

Jun 3, 2014

I have a dataset in the following manner

A B C D Value
1 0 2 3 D
2 1 3 4 D
6 2 3 4 A

The VALUE field is my problem. I need a formula so that the value field takes the max of the other four columns and returns a string (e.g. 'A' in the column header)

View 4 Replies View Related

Timer- To Write Code Which Takes A Reading Off Of A Device Every .005 Seconds

Jun 22, 2007

I am trying to write code which takes a reading off of a device every .005 seconds.

When I write the code as follows to take the reading every .004 seconds things work well.

PauseTime=5
Start = Timer
Oldtime=Timer
Do While Timer < Start + PauseTime
If Timer > Oldtime + .004 Then
Oldtime = Timer
Read(count) = Orbit.Networks(0).Modules(0).ReadCurrent
count = count + 1
End If
Loop
Finish = Timer

If however in the above code I only change .004 to .005 instead of taking readings every .005 seconds, I end up with readings roughly .015 seconds apart (approx)

Is there something unstable about the timer function to do this? Is there a different way to get a more stable result?

View 9 Replies View Related

Macro Takes Seconds In XP And 2003, Minutes In Vista And 2007

Sep 10, 2008

I have a fairly simple macro that takes a few seconds on my XP-computer with Excel 2003 but takes several minutes on my Vista-computer with Excel 2007.

The XP-PC has 2GB memory, the Vista-PC only 1GB, but it's hard to believe it's only that.
Is Excel 2007 so much slower than 2003?

The macro makes quite extensive use of the .rows(Rownr).Delete method. Is the fact that 2007 has 1 million rows against the 65536 of 2003 the culprit? It has to shift much more data up when deleting a row, no?

View 9 Replies View Related

Hyperlink Formula (Takes Coresponding Part Number Entered Into A Box)

Feb 16, 2010

I used the following guide to construct a hyperlink formula which takes me to the coresponding part number entered into a box,
http://www.ozgrid.com/Excel/hyperlink-lookup.htm

It works well in the database I set up with all the part number the problem comes when I tried to use the same hyperlink formula in a diffrent work book referencing the database.

I get a correct returned line reffrence from the macro but it will not open a link to the work book

=HYPERLINK('Database Final.xls'!wbsheet & ADDRESS(MATCH(N16,'[Database Final.xls]DATABASE'!$A$1:$A$9999,0),1),N16 & "s' Info")

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved