[Solved] Python FOR Loop [closed]

Python alternative for your function def test(): for i in range(1, 10): print(i) Note out that python has no variable declaration as it is not strongly-typed language. Also instead of next it has indentation as depth of execution. solved Python FOR Loop [closed]

[Solved] MS Access 2007 : the code vba not running

Option Access –> Centre de gestion de la confidentialité –> paramètres du Centre de gestion de la confidentialité –> paramètres des marcos –> (coché le dernier choix) activer toutes les macros … et OK voilà la réponse solved MS Access 2007 : the code vba not running

[Solved] Automate IE print dialog box without using SendKeys [closed]

It is, by using the InternetExplorer object’s ExecWB method (see this link for details). After adding a reference to the Microsoft Internet Controls library to your project, the following example should get you started: Option Explicit Sub PrintWebPage() Dim ie As InternetExplorer Set ie = New InternetExplorer ie.Navigate “http://www.google.com/” ie.Visible = 1 ‘Wait for page … Read more

[Solved] Matching color of a cell with another cell using VBA [closed]

The following code copies the color value from cell “C11” to cell “C4”: Range(“C4”).Interior.Color = Range(“C11”).Interior.Color As long as you work with valid Range-Objects, you can use different types to address the cells as fits your needs. For example the active selection (at least one cell or more): Selection.Interior.Color = Range(“C11”).Interior.Color 1 solved Matching color … Read more

[Solved] Excel VBA to convert all Word files in a specific folder to PDF [closed]

I’ve finally found the correct VBA I was looking for: ‘In your VBA window go to tools then references and add a reference to ‘Microsoft Word Sub Converter() Dim cnt As Integer, currfile As String Dim TrimFile As String, Path As String, FilesInPath As String _ , MyFiles() As String, Fnum As Long Dim CalcMode … Read more

[Solved] VBA – copy different template sheets from a workbook, into multiple sheets of another workbook based on criteria on a summary excel sheet

Okay, so here’s some code to get you started. I based the names on the code you gave, which is why it was helpful. I’ve commented this a lot to try and aid your learning, there are only actually about a dozen lines of code! Note: this code will likely not work “as is”. Try … Read more

[Solved] Create a dynamic list of products associated to a list of unique search keywords in VBA

You could use Dictionary object: Sub test() Dim keywordColumn As String, productColumn As String Dim products As String Dim i As Integer Dim myKey, p ‘after adding reference to Microsoft Scripting Runtime ‘Dim Keywords As New Dictionary Dim Keywords As Object Set Keywords = CreateObject(“Scripting.Dictionary”) keywordColumn = “B” productColumn = “A” With ActiveSheet maxRow = … Read more

[Solved] How to copy Outlook mail message into excel using Macros

I think this should pretty much do what you want. Sub Extract() On Error Resume Next Set myOlApp = Outlook.Application Set mynamespace = myOlApp.GetNamespace(“mapi”) Set myfolder = myOlApp.ActiveExplorer.CurrentFolder Set xlobj = CreateObject(“excel.application.14”) xlobj.Visible = True xlobj.Workbooks.Add xlobj.Worksheets(“Sheet1”).Name = “Statusmail” ‘Set the header xlobj.Range(“a” & 1).Value = “Absender” xlobj.Range(“a” & 1).Font.Bold = “True” xlobj.Range(“b” & 1).Value … Read more

[Solved] Remove duplicate rows Excel VBA

Here is an example that does this. Make sure you run it with the sheet you want to use up: Sub DeleteDupes() Dim x For x = Cells(Rows.CountLarge, “D”).End(xlUp).Row To 1 Step -1 If Cells(x, “D”) = Cells(x, “E”) Then ‘This line deletes the row: Cells(x, “D”).EntireRow.Delete xlShiftUp ‘This line highlights the row to show … Read more

[Solved] I Need this VBA Code to work in Entire Workbook

Maybe something like this Sub DeleteRows() Dim c As Range Dim SrchRng As Range Dim SrchStr As String Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets Set SrchRng = sh.Range(“b1”, sh.Range(“b65536”).End(xlUp)) SrchStr = sh.Range(“k1”) Do Set c = SrchRng.Find(SrchStr, LookIn:=xlValues) If Not c Is Nothing Then c.EntireRow.Delete Loop While Not c Is Nothing Next … Read more