Fill cells based on value in adjacent cell
I have this working macro button that will "reset all status" in the range B2:B15 to a default prompt for my colleagues to indicate job's status:Private Sub CommandButton1_Click()...
View ArticleLoading xls with EPPlus
I'm using the following code to load the xls file. public static Excel LoadExcel(string path) { FileInfo file = new FileInfo(path); ExcelPackage ep = new ExcelPackage(file); Excel xls = new...
View ArticleCount only visible data after filtering
I need to add to the below code to only count the visible data after filtering. I assume it is possibly .SpecialCells(xlCellTypeVisible) or similar after With Worksheet("calculations"), but I can't...
View ArticleHow can I combine multiple nested Substitute functions in Excel?
I am trying to set up a function to reformat a string that will later be concatenated. An example string would look like this:Standard_H2_W1_Launch_123x456_S_40K_AB Though sometimes the "S" doesn't...
View ArticleSmoothly load panel in custom taskpane?
As part of an Excel add-in I am developing, I have a custom taskpane. In the taskpane I have a couple of panels that works as 'pages' for my taskpane and on top of these panels i have a lot of controls...
View ArticleVBA - Multi wildcard filter using array values
Hello VBA Developers, I am having a hard time solving a multi-wildcard filter for criteria(s) listed in an array. The code stops at "vTst = Doc_ID_Arr(i)", stating vTst = Empty. However, checking...
View ArticleVBA code needed to print to PDF using "Microsoft Print to PDF" without...
I'm looking for a VBA excel code to print a webpage to PDF using Microsoft Print to PDF or doPDF10 without prompting to "Save File As." I want to provide the path and filename....My code is able to...
View Article.GetElementsByName.SelectedIndex visibly changes option but not...
I am having an issue and do not know how to resolve it, In Excel VBA I have this code that takes me through a website (https://indexcalculator.ftserussell.com/), however on step 3 of the site when I...
View ArticleReading the contents of the XLS file using ExcelDataReader
I use the following code to read the contents of the xls file using ExcelDataReader.List<string> excelFiles = GetExcelFileNamesInDirectory(Application.persistentDataPath); for (int i = 0; i <...
View ArticleHow to create an Excel solver type optimization in VBA [closed]
I am trying to create an optimization off a current weight in excel subject to min and max constraints. Below is an image of what I am working with. I also need to limit the number of decimal places to...
View ArticleOpen Combobox in Excel Window
I have a combo-box which works correctly, but it always seems to open on one monitor regardless of where I have excel open. I would like it to open "on top" of the excel application. Ideally it would...
View ArticleHow to call Python (from Linux server) in VBA [duplicate]
This question already has an answer here:Calling python script from excel/vba 6 answersHow to call python script on excel vba? 4 answersIs there a way to call a Python code in Excel-VBA? 4 answersRun...
View ArticleProgrammatically adding reference gives run-time error
I've written two VBA add-ins for Excel (Office 2011, Mac): The first, 'basic' add-in also provides functions for the second add-in. There will also be other add-ins that use functions of the basic...
View ArticleHow to sort using column header as reference?
Is there a way in VBA to sort a column using it's header name? Since the column may change regularly, I cannot reference the column number to sort it, I need to use the column header for sorting. For...
View ArticleHow can I programmatically map XML fields in Excel 2013?
I'm trying to programmatically map some fields from an XML file to a table in excel. Manually, I go to the developer tab, hit the source button, select XML Maps, press the add button, paste in the path...
View ArticleSet Accelerator for programmatically added button
I can't figure out what I'm doing wrong here. I added a button to an Excel Sheet programmatically. I am trying to assign an accelerator key, but it does not get assigned. The relevant code is:Sub...
View ArticleVBA to programmatically fix "errored" cells?
I'm having a bit of trouble with dates. I've read a lot about it and it seems pretty common that dates format weird. What's happening with mine is when I bring data from an xlsx file or csv file into...
View Article2-week work planning macro my work is not working [closed]
Sub doit() Dim DataRange As Range ' Could also be Dim DataRange as Object Dim myUnion As Range Set myUnion = Union(rowS(1), rowS(2), rowS(3)) Dim row(1) As Long Dim MaxRows As Long Dim col As Integer...
View ArticleHow can I resolve an 'Out of memory' error in my Hyperlink macro?
I found a macro to take values from column A and add them to the end of a hyperlink, for all sheets in the workbook. I did some digging on the forums and Frankenstein'd the following code, but after a...
View ArticleProgrammatically adding a commandbutton to a userform
In excel vba I have added a commandbutton to userform... like below Set ctrl = Me.Controls.Add( _ bstrProgID:="Forms.CommandButton.1", _ Name:="CommandButton1", Visible:=True) Now I wanted to know how...
View Article