Excel VBA Setting ListView Scrollbar Position

I currently have a ListView in a userform that has sorting functionality built in. When the column header is clicked the ListView is sorted properly, but it refreshes the scrollbars back to the default positions. What I am looking for is a way to navigate back to whatever the horizontal and vertical scrollbar positions were […]

Sumproduct in Excel VBA using function arguments as source

I’m trying to write a VBA function that takes the function arguments as the source and then runs SQL commands on it. The SQL command I’m currently trying to implement as a first step is the equivalent of Excel’s sumproduct() function, which in SQL would be something along the lines of “SELECT SUM(A * B)”. […]

ListBox1.Selected(i) = True stops working

I want to move selected Items from one Listbox into a second Listbox , its working fine. After a while though, its stops working! Private Sub add_Click() ‘delete old selection For i = 0 To Listbox2.ListCount – 1 Listbox2.RemoveItem (i – counter) counter = counter + 1 Next i For i = 0 To Listbox1.ListCount […]

HSSF cell style applied only after clicking it in Excel

As article states – created style applies only after i open created *.xls file and double click formatted cell. public HSSFWorkbook makeWorkbookExc(List<String[]> allValues, List<String> captions, Integer[] order, List<Integer> numTypeColumns,List<Integer> dateTypeColumns, final container container, final List<ErrorContainer> errors) { HSSFWorkbook workbook = new HSSFWorkbook(); HSSFFont fontBold = workbook.createFont(); fontBold.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); fontBold.setFontHeightInPoints((short) 11); HSSFCellStyle styleBold = workbook.createCellStyle(); styleBold.setFont(fontBold); HSSFFont […]

vba listbox to connect with excel

I am getting an error on below line. ListBox1.RowSource = “Tabelle1!A2:C” & loletzte Here is my code: myFileNameDir3 = Sheet3.Range(“V10”).Value & TextBox116.Text & “.xlsx” Workbooks.Open fileName:=myFileNameDir3, UpdateLinks:=0 Set ws3 = Worksheets(“Sheet1”) With ListBox5 .ColumnCount = 3 .ColumnWidths = “1cm;2cm;2cm” .ColumnHeads = True ListBox5.RowSource = ws1.Range(“A1”).CurrentRegion ‘oder: ‘ListBox1.RowSource = “Tabelle1!A2:C” & loletzte End With

Highlighting cells/making them bold in Excel

In a group project I have to write a table to an Excel sheet. This I have done but I need to highlight the table area where the data goes, as can be seen on these pictures: https://gyazo.com/51c57897d9a1ce8df000d6ff0f18de20 https://gyazo.com/bcc879cd7d1c5f12ccb853490dca22f2 The first picture shows how it should look without data, and the second picture shows my […]

Renaming Sheets from cells with a loop

The code below is what i use to rename a bunch of sheets within a workbook. it works perfectly. It renames the sheet based off of a cell in that sheet. but now i have two sheets trying to use the same name. So i want to keep the same code but add a loop […]

Close FileDialog programmatically

I’m working on a system that connects an Excel spreadsheet to an Access back end. Due to symbolic link issues in the network, queries in the spreadsheet linked directly to the Access back end fail if users don’t go into Explorer first and connect to drives by clicking on them. I’ve found initiating an instance […]

PrimeFaces Data Exporter exporting sheet on dataTable filtering

I used data table with lazy Load implementation to which I had the data exporter. The issue is when filtering on data table and click on enter button an excel sheet is generated by default with all data of data table. when I debugged my code the bean method is executed which I called upon […]

checkbox not working vba excel

this code marks cells from a table so they can be easily seen (its hardcoded but at least it works), the problem is that if i add a checkbox to the mix it doent work heres the code For x2 = 0 To j For x3 = 1 To 25 Hoja9.Cells(x2 + 4, 27) = […]

MS Excel Spreadsheet is the best Office Software, Excel VBA and Excel Formulas make Spreadsheet work faster.