VBA USERFORM SCREEN SIZE
I tried to fit the vba userform with laptop screen size.But it is not coming properly.Kindly Suggest
See also questions close to this topic
Find column headers and highlight it including below cells of it
Private Sub CommandButton2_Click() Dim headersRange As Range, cellsToloop As Range Dim col As Long, lRow As Long, colName As String Set headersRange = Range("HeadersToFind") For Each cellsToloop In headersRange 'This line works If cellsToloop.Value = "Sun" Then 'This line works cellsToloop.Cells.Interior.Color = RGB(160, 160, 100) ' up to here 'From here it does nothing col = cellsToloop.Column colName = Split(col.Cells(, col).Address, "$")(1) lRow = .Range(colName & .Rows.Count).End(xlUp).Row Set rng = .Range(colName & "8:" & colName & lRow) rng.Cells.Interior.Color = RGB(160, 160, 200) 'Upt her doesnt work End If Next cell End Sub
With this code, i managed to highlight the headers but i failed to highlight cell under each column header Sun.
Graph with addchart2 in VBA-excel
i'm trying to automate a task with VBA. I want to ADD new graph in excel, I do it with command:
Set wkChart = wkSht.Shapes.AddChart2(-1, xlXYScatterSmoothNoMarkers, wkColWidth, 450 * (dNumber - 1), 864, 450)
Excel automate add all line in my worksheet on this graph, but i dont know how to delete line or disabled this function
How to extract common phrases in a range
I'm trying to extract the most common phrase in a range, return the result in the cell where the formula is entered.
For example [https://i.stack.imgur.com/7cwNO.jpg]
On this table,
range= B1:F1has a common phrase of "
Hamburg D 4/".
I would like a formula/VBA code to extract that from an unlimited range of cells.
Thank you in advance.