excel-2010

Can't format the date properly in VBA, Excel 2012

孤人 提交于 2019-12-01 00:51:36
I'm working on a VBA script in Excel 2010 that picks up certain events from a MySQL database based on the dates of the events. The dates in the database are stored in a "yyyy-mm-dd hh:mm:ss" . My users will be using a from-to date range to filter the events they are interested in. To make it easier for them I use two calendar controls (mscal.ocx) for the range - Calendar1 for from and Calendar2 for to. I wrote two simple subroutines to make sure that every click on the calendars automatically updates cells from which i take data for the query string, which looks like this : Private Sub

How to merge cells based on similar values - Excel 2010

爷,独闯天下 提交于 2019-12-01 00:19:40
I have a problem merging cells in excel based on similar values for one column- I would like to keep other columns data - let's view some screenshots and it will be clearer: This above is the initial state of the Data, what I want to achieve is this: I'm sure there is a way to do it with VB or formulas- I need the most simple way possible as this is for a customer and it needs to be easy. Thank you all in advanced. Option Explicit Private Sub MergeCells() Application.ScreenUpdating = False Application.DisplayAlerts = False Dim rngMerge As Range, cell As Range Set rngMerge = Range("A1:A100")

How to change the default vba references in excel 2010

萝らか妹 提交于 2019-12-01 00:05:33
I want to add a vba function to personal.xlsb, but this function has an ADODB.Connection object in it. I can resolve that by (in the VBA editor) selecting tools -> references and then checking the box "Microsoft ActiveX Data Objects 6.0 Library" My question is, how do I make "Microsoft ActiveX Data Objects 6.0 Library" one of my default references so that it is always available whenever I start up excel? While Siddharth's solution is very handy, I thought I would offer these functions from a tool I rolled out where we were constantly getting calls that related to the fact the user didn't have

convert an Excel 2010 addin to a 2007 addin (both VSTO)

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 23:23:51
问题 I am currently working on an Excel 2010 add-in which formerly was an Excel 2007 add-in. Somewhere in the process of switching computers, the add-in was converted i think. Some of my customers stated that the add-in wasn't working on Excel 2007 anymore so I tried to debug it in a VirtualBox with Excel 2007 and Visual Studio 2010 installed. Now I get the Error Message: You cannot debug or run this project, because the required version of the Microsft Office application is not installed. I

XmlHttp Post in Excel VBA not updating website form

核能气质少年 提交于 2019-11-30 23:12:53
I routinely have to search the state of NV for unclaimed property and put the results in an Excel spreadsheet. I am trying to automate the process but I'm limited to using Excel 2010 and VBA. Below is the URL to the site I'm trying to submit a form using xmlhttp. URL: https://nevadatreasurer.gov/UPSearch/ I created a class to automate submitting forms on other websites but no matter what I enter in the postdata the form is never submitted. Below is my submission, and method to submit the form. Call to class: cXML.openWebsite "Post", "https://nevadatreasurer.gov/UPSearch/Index.aspx", _ "ctl04

Split single row into multiple rows based on cell value in excel

岁酱吖の 提交于 2019-11-30 21:02:55
问题 I have a single row of data in excel. Data is around 5000+ values. I want to split this single row into multiple rows.Below is the example of same. My Single row contains data as follows, 1 2 3 4 5 A 1 2 4 5 9 5 9 A 2 1 4 A etc... I want this single row to be split after every "A" value it reaches. Output below. 1 2 3 4 5 A 1 2 4 5 9 5 9 A 2 1 4 A Etc... Can some1 help me as how this can be done? Macro is fine with me. Also I have huge data like 5000+ Values. 回答1: This should do your job.

Creating Excel Macro for Exporting XML to a certain folder

别来无恙 提交于 2019-11-30 20:49:16
问题 I need to create a macro (which I have never done before) and if you guys can guide me to a right path, it would be really appreciated. What I'm doing currently: I have created a mapping XML which I have imported into Excel. Once it is imported into Excel, users will then go ahead and paste some data in it and export it to receive an XML data file, which then user can drop it to a FTP where the job picks it up and imports it into database. Here's the problem: The export has following node,

Excel “UnCONCATENATE”/explode in function / Convert cell into array

馋奶兔 提交于 2019-11-30 19:12:02
问题 I am trying to "Unconcatenate" a string in Excel 2010. Yes, I know that is not a real word. So pretty much; I have a cell that can not be split into multiple columns the cell looks like this: Item 1, Item 2, Item 3 Now this cell may have 0-? items. I am wanting to compare that one cell against a column in another sheet. I believe I would need to use the match function to do this, but I need that first cell to be converted into an array in a function with the delimiter as the comma. So far I

Excel 2010 64 bit can't create .net object

淺唱寂寞╮ 提交于 2019-11-30 18:10:14
问题 I have a simple class library that I use in Excel. Here is a simplification of my class... using System; using System.Runtime.InteropServices; namespace SimpleLibrary { [ComVisible(true)] public interface ISixGenerator { int Six(); } public class SixGenerator : ISixGenerator { public int Six() { return 6; } } } In Excel 2007 I would create a macro enabled workbook and add a module with the following code: Public Function GetSix() Dim lib As SimpleLibrary.SixGenerator lib = New SimpleLibrary

How to change the default vba references in excel 2010

时光怂恿深爱的人放手 提交于 2019-11-30 18:06:02
问题 I want to add a vba function to personal.xlsb, but this function has an ADODB.Connection object in it. I can resolve that by (in the VBA editor) selecting tools -> references and then checking the box "Microsoft ActiveX Data Objects 6.0 Library" My question is, how do I make "Microsoft ActiveX Data Objects 6.0 Library" one of my default references so that it is always available whenever I start up excel? 回答1: While Siddharth's solution is very handy, I thought I would offer these functions