excel-2010

AppActivate works in Excel 2007 but not in 2010

人盡茶涼 提交于 2019-12-22 18:41:08
问题 I have a excel macro that I run in Excel 2007 and it opens a mainframe application so I can import data from my spreadsheet automatically. This has been working fine, however it doesn't work in Excel 2010. I have tried using the shell command to use the ID but the other application is a mainframe application and non windows based. However, AppActivate "Title" (to open the mainframe application) was working fine in excel 2007. In Excel 2010 I am getting a Run-time error 5 - Invalid procedure

How to select table rows/complete table?

前提是你 提交于 2019-12-22 18:23:31
问题 The setup: I have an excel doc with a form for entering data, the data for that form is entered in a table to allow for easy entering of multiple rows of data. At least i thought so. So right now i am trying to select the table to insert its data in the appropriate places. My question, i think, is this: do i select one table row at a time, or the whole table and deal with each row separately. And how do i do that? I tried Sheets("Form").Range("dataForm[#ALL]").Select and several variations

Excel VBA; Updating a connection string

岁酱吖の 提交于 2019-12-22 11:13:15
问题 I'm just trying to get VBA to update an OLEDB connection string. When I step through the code, I don't get any errors but the connection refresh fails and when I examine the connection string in the UI, it's obvious that my code has not changed it at all (hence the refresh failure). What have I missed? Here is the code: Sub UpdateQueryConnectionString(ConnectionString As String) With ActiveWorkbook.Connections("Connection Name"). _ OLEDBConnection .Connection = StringToArray(ConnectionString)

Excel VBA - Open workbook in sharepoint fails until I log into sharepoint and access file

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 08:38:41
问题 EDIT 3/31/14 -- No responses...still baffled by this behavior. Bump! Any thoughts? I have set up some code in an Excel workbook on my local harddrive that navigates to a corporate sharepoint site, browses through a set of folders, and when it comes upon a file, it opens it and pulls some data down. I pieced a lot of it together from other posts and from a previous question I asked. Here is the issue I have. If I run it without first going into the Sharepoint site and opening a file, it throws

MsgBox focus in Excel

萝らか妹 提交于 2019-12-22 06:55:56
问题 I am calculating a lot of data with VBA in Excel and want to show a MsgBox when it's done. The MsgBox actually shows the time it took for the calculation. The problem is when the user decides to do something else while the computation happens. Excel continues to calculate, and when it's done, the MsgBox does show but for some reason, Excel doesn't give the focus to the MsgBox. The Excel icon will blink in the taskbar and if we click it, Excel does maximize, but the MsgBox is behind the Excel

Excel 2010, VBA and ListObjects subtotals not updating on Table changes

时光毁灭记忆、已成空白 提交于 2019-12-22 05:06:23
问题 So, having this structure (starting at A1 - show snippet > run): table { border-color: #BBB; border-width: 0px 0px 1px 1px; border-style: dotted; } body { font: 12px Arial, Tahoma, Helvetica, FreeSans, sans-serif; color: #333; } td { border-color: #BBB; border-width: 1px 1px 0px 0px; border-style: dotted; padding: 3px; } <table> <tbody> <tr> <th></th> <th>A</th> <th>B</th> <th>C</th> <th>D</th> </tr> <tr> <td>1</td> <td>Title 1</td> <td>Title 2</td> <td>Title 3</td> <td>Title 4</td> </tr> <tr

Can I use VBA in Excel 2010 Starter Edition?

笑着哭i 提交于 2019-12-22 04:43:35
问题 I have the MS-Excel 2010 "Starter Edition" - it comes bundled into pre-built PCs. Does this edition support VBA macros? I cannot tell. I searched and I am still not clear on this. 回答1: No, unfortunately you can't use VBA in starter edition. It's one of the features that are disabled. It's available in the Standard or Premium editions. 来源: https://stackoverflow.com/questions/5682527/can-i-use-vba-in-excel-2010-starter-edition

How do you figure out the MEDIAN of a column taking into account filters?

时光毁灭记忆、已成空白 提交于 2019-12-22 03:56:35
问题 I've recently discovered that you can use SUBTOTAL for various functions which allow you to sum up or find totals of a column, even whilst there are filters being applied to it. However, the list of functions SUBTOTAL has does not include MEDIAN . Is it possible to find the median of a column of numbers taking into that some rows have filtered out? 回答1: Updated to pick up comments from lori_m below 1. Original answer - all xl versions Courtesy of Aladin Akyurek from this solution If your data

Select column and apply “General”-format to all cells + put macro on a button

痞子三分冷 提交于 2019-12-22 01:07:27
问题 I am looking to do the following: When pressing a button, the Macro should be activated. The Macro selects Column H (not the whole column, just until data goes. The last line with data can be determined if after that line the next 10 lines are empty) in Sheet 2 (same workbook). For this selection, the "General" format is applied to every cell. After this, the same runs through for Column G. Then, the Macro ends. I think it should be easily possible, but I am especially struggling with the

MS Excel do not copy the color theme automatically

扶醉桌前 提交于 2019-12-22 00:54:17
问题 I am using MS Excel 2010 My Company uses a set of standard color scheme / theme for MS Excel 2010 .I gave it a name (companycolor). I have a template contains that color scheme and a macro in it to perform tasks. When I press macro button it makes a copy of activesheet,protect it and email it to intended recipient.Problem is that when macro makes a copy of activesheet into a new workbook it doesn't copy the color scheme / theme that template have, I mean with the my company color scheme