vbaexcel.eu
Insert Image to Word, Resize Image, Insert Borders using VBA Excel
http://vbaexcel.eu/vbaexcel/8-insert-image-to-word-resize-image-insert-borders-using-vba-excel
Insert Image to Word, Resize Image, Insert Borders using VBA Excel. The program inserts an image to a word file and resizes the images and inserts a border. In order to make the program work the reference Microsoft Word XX.X Object Library needs to be enabled. Example file of the VBA code is available for downloading at the bottom of this web page, enjoy! Or just copy and paste the code directly from this page. Public Sub Insert Image to Word Resize Image Insert Borders using VBA Excel(). Insert Image to...
vbaexcel.eu
Open Close Save As Word File
http://vbaexcel.eu/vbaexcel/8-open-close-save-as-word-file
Open Close Save As Word File. This program opens a word file on a predefined location and saves the file with another name to another place. In order to make the program work the reference Microsoft Word XX.X Object Library needs to be enabled. An example file of the code is possible to download at the end of this web site, enjoy! Or just copy and paste the code directly from this page. Sub Open Close Save As Word File(). Dim Open Close Save As Word File APP As Word.Application. Open Close Save As Word F...
vbaexcel.eu
Extract, Get Data from MySQL PHP
http://vbaexcel.eu/vbaexcel/8-extract-get-data-from-mysql-php
Extract, Get Data from MySQL PHP. This VBA Macro code extracts data from a MySQL Database and writes the data to an excel file. Many use this for large quantities of data control for PHP web development. To be able to run the VBA Macro code make sure you have enabled the Microsoft ActiveX Data Objects X.X Library. Also a ODBC connector check mysql.com needs to be installed on your computer. Dim Password As String. Dim SQLStr As String. Dim Cn As ADODB.Connection. Dim Server Name As String. RsOpen SQLStr,...
vbaexcel.eu
Read Text File Fetch Data
http://vbaexcel.eu/vbaexcel/8-read-text-file-fetch-data
Read Text File Fetch Data. This code snippet reads a text file and fetches the data into the worksheet. The entire VBA Excel program is available for downloading at the bottom of this page, enjoy! Dim NameOfFile As String. Dim PlaceOfFile As String. Dim Filelocation As String. NameOfFile = Range("c6").Value. PlaceOfFile = Range("c5").Value. Filelocation = PlaceOfFile " " NameOfFile. Range("c10").Value = sText. Function ReadTextFileFetchDataMain(ReadTextFile As String) As String. Muyu bueno, gracias por l...
vbaexcel.eu
List Files In Directory
http://vbaexcel.eu/vbaexcel/8-list-files-in-directory
List Files In Directory. A simple program for listing all files in a certain directory by calling a VBA Macro Code. The entire VBA Excel program is available for downloading at the bottom of this page, enjoy! Public Sub List Files In Directory(). Dim List Files In Directory(10000, 1). Dim One File List As String. Dim Number Of Files In Directory As Long. One File List = Dir$("C:" " *.*"). Do While One File List ". List Files In Directory(Number Of Files In Directory, 0) = One File List. Comment made by: ...
vbaexcel.eu
Rnd Random Function
http://vbaexcel.eu/vbaexcel/8-rnd-random-function
Rnd Random function is a short code snippet that shows how the useful Rnd Random function VBA macro is working. The excel file is available for download at the bottom of this page! For lups = 1 To 10000. Color2 = Int( 50 * Rnd) 1). Row = Int( 25 * Rnd) 1). Column = Int( 25 * Rnd) 1). Range("G2").Offset(Row - 1, Column - 1).Interior.ColorIndex = Color2. Random Function Rnd.xls. Two 3 minus 1=.
vbaexcel.eu
Database connection , retrieve data from database, querying data into excel using VBA DAO
http://vbaexcel.eu/vbaexcel/8-database-connection-retrieve-data-from-database-querying-data-into-excel-using-vba-dao
Database connection, retrieve data from database, querying data into excel using VBA DAO. The VBA code makes a database connection and retrieves data by calling and giving input to existing database query. In order to make the VBA code work the following reference needs to be enabled Microsoft DAO 3.6 Object Library . The entire VBA program can be downloaded in an excel file at the end of this web page or just copy and paste the code directly from the page! Dim Database RetrieveData VBA Excel As String.
vbaexcel.eu
Determine If File or Directory Exists
http://vbaexcel.eu/vbaexcel/8-determine-if-file-or-directory-exists
Determine If File or Directory Exists. The VBA Macro determines if a file or directory exists. The entire VBA Excel program is available for downloading at the bottom of this page, enjoy! Dim DetermineFileExists As Integer. Dim PathOfName As String. Range("C8").Value = ". Range("C8").Interior.ColorIndex = 0. If the file does not exist the program will log an error. On Error Resume Next. PathOfName = Range("C5").Value " " Range("C6").Value. Select Case Err.Number. Case Is = 0. On Error GoTo 0.
vbaexcel.eu
Stop and Wait While Executing VBA Code
http://vbaexcel.eu/vbaexcel/8-stop-and-wait-while-executing-vba-code
Stop and Wait While Executing VBA Code. This programs stops and waits for a few seconds in the middle of the execution of the VBA code. An example file of the code is possible to download at the end of this web site, enjoy! Or just copy and paste the code directly from this page. Stops the execution of the code and continues after 10 seconds. Application.Wait Now TimeValue("00:00:10"). Stop and Wait While Executing VBA Code.xls. Its very interesting topic. Comment made by: madhu , 2010-04-08 09:10:42.
vbaexcel.eu
Email Sender VBA Outlook
http://vbaexcel.eu/vbaexcel/8-email-sender-vba-outlook
Email Sender VBA Outlook. Email Sender VBA Outlook is an emailing program that sends emails by communicating with Microsoft Outlook. The entire VBA Excel program is available for downloading at the bottom of this page, enjoy! Sub Email Sender VBA Microsoft Outlook(). WaitTimeSecondsBetweenMail = Range("c4").Value. PlaceToStoreEmailTemplate = Range("c5").Value. While Range("A14").Offset(RowA, 0).Value tom. ToAdress = Range("c14").Offset(RowA, 0).Value. Subject = Range("d14").Offset(RowA, 0).Value. NewSeco...