excel-2010

Calculate only the active workbook before saving

こ雲淡風輕ζ 提交于 2019-12-10 11:03:43
问题 I have tried my level best to find an answer for this question and with no luck I am here posting my first question on stackoverflow. Question: Can excel calculate only the active workbook before saving while other workbooks are open. Scenario: I have a large workbook with multiple sheets of reports with formulas. The main control VBA creates multiple workbooks with multiple sheets of reports based on several variables. All report workbooks are converted to values on creation. Problem: it

error on sql script with 'openrowset'

懵懂的女人 提交于 2019-12-10 10:29:58
问题 I'm having a problem with my SQL script: SELECT SP.[MobileNumber], SP.[LastName], SP.[FirstName] FROM SampleTable1 SP INNER JOIN OPENROWSET ( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\devpc11\sample.xls;', 'SELECT MobileNumber, LastName, FirstName FROM [SampleData$]') T ON SP.[MobileNumber] = T.[MobileNumber] GO when i try to execute this, it generates this error: Msg 7357, Level 16, State 2, Line 1 Cannot process the object "SELECT MobileNumber, LastName, FirstName FROM [SampleData$]

ReDim Preserve error

元气小坏坏 提交于 2019-12-10 10:29:37
问题 I am trying to redim preserve a two dimensional array. at the very top of my code I have: Dim BayQuestionArray() As Variant Dim numberofbay As Double I have two buttons, the first button is for initializing the array size: numberofbay = 1 ReDim Preserve BayQuestionArray(numberofbay, 37) and the second button is for upsizing the array ReDim Preserve BayQuestionArray(numberofbay + 1, 37) The second button doesn't work, it keeps giving me an error saying Run time error 9 Subscript out of range.

How do I sum a named range of values that contains errors?

你。 提交于 2019-12-10 05:21:23
问题 I have an Excel spreadsheet which imports data from another source that I need to run a calculation on. The data I need to work with is in a named range - it happens to be in the range C12:C36 - but it's called "SumData". The values in this range contain a number of errors currently including #NUM! and #N/A, but could potentially contain other errors. I need to sum these values. I understand how to do the sum formula: =SUM(SumData) Or =SUM(C12:C36) I can also use IFERROR to check for errors:

numeric up down control in vba

我的梦境 提交于 2019-12-10 02:36:53
问题 Is there an in-built numeric updown control in vba or do we need to create a control like that? If there is such a control then what are the events that we may use. Pls suggest. 回答1: You can use the SpinButton1 control for that SNAPSHOT CODE You can either set the min and max of the SpinButton1 in design time or at runtime as shown below. Private Sub UserForm_Initialize() SpinButton1.Min = 0 SpinButton1.Max = 100 End Sub Private Sub SpinButton1_Change() TextBox1.Text = SpinButton1.Value End

Iterating through Excel sheets

旧时模样 提交于 2019-12-09 19:19:16
问题 Here is my code. I'm new to VBA so, I am unsure how to iterate through multiple pages. Here's my code: Dim ws As Worksheet Sub spellCheck() For Each ws In ActiveWorkbook.Worksheets Cells.CheckSpelling Next End Sub 回答1: Try this (this will simply activate each sheet): Sub spellCheck() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets ws.Activate ' Do stuff... Next End Sub 来源: https://stackoverflow.com/questions/12060855/iterating-through-excel-sheets

Copying an array to a filtered range gives irrational results

时光毁灭记忆、已成空白 提交于 2019-12-09 18:53:09
问题 Copying the values of a filtered range to an array seems to work without a problem: the array then contains values from both filtered and unfiltered cells. However, when I copy the array's contents back to the filtered range, the results are incomprehensible to me. Here's my code: Sub test() Dim rangecopy() As Variant rangecopy() = Range(Cells(2, 1), Cells(14, 3)).Value For c = LBound(rangecopy, 1) To UBound(rangecopy, 1) rangecopy(c, 1) = c rangecopy(c, 2) = c * 10 rangecopy(c, 3) = c * 100

Identify a child cell in an array

て烟熏妆下的殇ゞ 提交于 2019-12-09 18:31:59
问题 In the following array of 24 rows, there are 9 children (terminal nodes) - shaded yellow for clarity. In other words, every entry has a child except for the terminal nodes. For example, 5E has 2 two terminal nodes. 14G is a terminal node, but 15G is not. 16H is terminal. 17H has 2 children (terminal nodes). 22F also has 2 children (terminal nodes). How to write an excel function or macro that identifies these terminal nodes? 回答1: Given your data, the following conditional format seems to work

how to create xlsx files using coldfusion

ε祈祈猫儿з 提交于 2019-12-09 16:55:15
问题 Disclaimer: I am new into coldfusion. I am trying to create an Excel 2010 document with images and multiple tabs. I have been able to get this to output into XLS, but I cannot get the image into the file. I have not been able to find a complete example of how to Properly create an XLSx file. I would prefer to learn the right way and develop my own bad habits later, rather than just have bad habits. Here is an example: <!--- Make CF export to Excel ---> <!--- This will create a XLS file ---> <

Open New Instance of Excel 2010 with every file [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-09 15:32:22
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 years ago . I am using Excel 2010 and want to manage a large Excel files. So I would like to open a new Excel Instance when opening every file from my Windows Explorer. At the point all files are opened in the same Excel Instance. Any assistance is kindly appreciated. John. [ I fould this: http://www.online-tech-tips.com/ms