Posts by ashu1990
-
-
Re: (newbie) Count a range of labels, split in half and highlight the top half
attach a workbook with the input data and the out put data as required..
-
Re: Macro needed to enable and disable an Active X ComboBox
tried your code it worked for me....
try giving the sheet name before the combobox name.. eg:- sheet1.combobox1.enabled = true
-
Re: Using VBA can we check the FONT format all the files in a Specific Folder
create a sheet named Font Checker as i have removed the code to create a sheet and try this new code
Code
Display MoreOption Explicit Sub test() Dim wbk As Workbook, path As String, i As Long, fname As String, cell As Variant,font_cri as string path = ActiveSheet.Range("B3").Value '<--- Path of the folder font_cri = ActiveSheet.Range("C3").Value ThisWorkbook.Worksheets("Font Checker").clearcontents fname = Dir(path & "\", vbNormal) Do While fname <> "" If Mid(fname, InStr(fname, "."), 4) <> ".xls" Then Goto SKP: Set wbk = Workbooks.Open(path & "\" & fname) For i = 1 To wbk.Worksheets.Count For Each cell In wbk.Worksheets(i).UsedRange If cell.Font.Name <> font_cri Then With ThisWorkbook.Worksheets("Font Checker") .Range("A" & Range("A:A").Rows.Count).End(xlUp).Offset(1, 0).Value = wbk.FullName .Range("B" & Range("B:B").Rows.Count).End(xlUp).Offset(1, 0).Value = wbk.Worksheets(i).Name .Range("C" & Range("C:C").Rows.Count).End(xlUp).Offset(1, 0).Value = cell.Address(0, 0) & "-" & cell.Value & "- Arial Font Is Not Matching" End With End If Next cell Next i wbk.Close False SKP: fname = Dir() Loop ThisWorkbook.Worksheets("Font Checker").Range("A1").Value = "File Name" ThisWorkbook.Worksheets("Font Checker").Range("B1").Value = "Sheet Name" ThisWorkbook.Worksheets("Font Checker").Range("C1").Value = "cell Value and address" End Sub
-
Re: VBA to click checkbox in Internet Explorer
hey olsonj dont give up easily see if the checkbox is inside the frame how ever you can loop through all the elements in the web page and see if you finds the correct ID for the check box
-
Re: Using VBA can we check the FONT format all the files in a Specific Folder
here's the altered code
Code
Display MoreOption Explicit Sub test() Dim wbk As Workbook, path As String, i As Long, fname As String, cell As Variant path = ActiveSheet.Range("B3").Value '<--- Path of the folder font_cri = ActiveSheet.Range("C3").Value Module1.delete_sheets ("Font Checker") ThisWorkbook.Sheets.Add after:=ActiveSheet: ActiveSheet.Name = "Font Checker" fname = Dir(path & "\", vbNormal) Do While fname <> "" If Mid(fname, InStr(fname, "."), 4) <> ".xls" Then GoTo SKP: Set wbk = Workbooks.Open(path & "\" & fname) For i = 1 To wbk.Worksheets.Count For Each cell In wbk.Worksheets(i).UsedRange If cell.Font.Name <> font_cri Then With ThisWorkbook.Worksheets("Font Checker") .Range("A" & Range("A:A").Rows.Count).End(xlUp).Offset(1, 0).Value = wbk.FullName .Range("B" & Range("B:B").Rows.Count).End(xlUp).Offset(1, 0).Value = wbk.Worksheets(i).Name .Range("C" & Range("C:C").Rows.Count).End(xlUp).Offset(1, 0).Value = cell.Address(0, 0) & "-" & cell.Value & "- Arial Font Is Not Matching" End With End If Next cell Next i wbk.Close False SKP: fname = Dir() Loop ThisWorkbook.Worksheets("Font Checker").Range("A1").Value = "File Name" ThisWorkbook.Worksheets("Font Checker").Range("B1").Value = "Sheet Name" ThisWorkbook.Worksheets("Font Checker").Range("C1").Value = "cell Value and address" End Sub Public Sub delete_sheets(ByVal shname As String) On Error Resume Next Application.DisplayAlerts = False ThisWorkbook.Worksheets(shname).Delete Application.DisplayAlerts = True End Sub
-
Re: VBA to click checkbox in Internet Explorer
are you sure that the checkbox name you are using is the right checkbox name or id..
any ways try this..
Code
Display Moreie.document.forms(0).all("BATCH-EXPORT").item(0).checked = true 'or ie.document.forms(0).all("BATCH-EXPORT").item(0).click 'or ie.document.forms(0).all("BATCH-EXPORT").click
its difficult to guess with out accessing the web page...
-
Re: Using VBA can we check the FONT format all the files in a Specific Folder
hi bindu,
welcome to the forum... as you should know that the task which you want usses loops and will check each cell in the file on every sheet so be patient while running the macro as its gona take a lot of time depending on your data size.....
Code
Display MoreOption Explicit Sub test() Dim wbk As Workbook, path As String, i As Long, fname As String, cell As Variant path = "" '<--- Path of the folder ThisWorkbook.Sheets.Add after:=ActiveSheet: ActiveSheet.Name = "Font Checker" fname = Dir(path & "\", vbNormal) Do While fname <> "" If Mid(fname, InStr(fname, "."), 4) <> ".xls" Then GoTo SKP: Set wbk = Workbooks.Open(path & "\" & fname) For i = 1 To wbk.Worksheets.Count For Each cell In wbk.Worksheets(i).UsedRange If cell.Font.Name <> "Arial" Then With ThisWorkbook.Worksheets("Font Checker") .Range("A" & Range("A:A").Rows.Count).End(xlUp).Offset(1, 0).Value = wbk.FullName .Range("B" & Range("B:B").Rows.Count).End(xlUp).Offset(1, 0).Value = wbk.Worksheets(i).Name .Range("C" & Range("C:C").Rows.Count).End(xlUp).Offset(1, 0).Value = cell.Address & "-" & cell.Value & "- Arial Font Is Not Matching" End With End If Next cell Next i wbk.Close False SKP: fname = Dir() Loop ThisWorkbook.Worksheets("Font Checker").Range("A1").Value = "File Name" ThisWorkbook.Worksheets("Font Checker").Range("B1").Value = "Sheet Name" ThisWorkbook.Worksheets("Font Checker").Range("C1").Value = "cell Value and address" End Sub
-
Re: Prevent outlook popup.
it cant be done by vba you have to allow it manually or use a third party addin into the outlook to bypass the popup or use your SMTP server to send the mail..
here are some usefull links
for addin http://www.experts-exchange.co…e/Outlook/Q_26601688.html
for sending Mail through Server side http://www.rondebruin.nl/win/s1/cdo.htm
-
-
-
Re: Activate file name based on cell value date in a sheet vba
whats the actual file name...
-
-
-
Re: Change font of the last word in a cell if its in brackets
thanks mate both the links are good will try to work more with regex with every task
-
Re: Change font of the last word in a cell if its in brackets
agreed with apo Jindon your codes always use regex can you just clear some logic behind it..
-
Re: Change font of the last word in a cell if its in brackets
put this in worksheet code panel and change the column name as desired
Code
Display MorePrivate Sub Worksheet_SelectionChange(ByVal Target As Range) Dim sh For Each sh In Range("A:A") If Len(sh) = 0 Then GoTo TT: If VBA.Mid(sh, Len(sh), 1) = ")" Then With sh.Characters(Start:=InStr(sh, "("), Length:=Len(sh)).Font .Name = "Calibri" .FontStyle = "Regular" .Size = 11 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 .ThemeFont = xlThemeFontMinor End With End If TT: Next sh End Sub
-
Re: Make HTML table lines visible via vba
i didn't get it i ran the code and worked perfect for me anyways here's a useful link i found might help you http://www.pindari.com/rtf3.html
-
-
Re: Block cell to change after a certain time.
I hope tom you got your answer..:smile: