I am looking for a macro that can be link to a button that will automatically load and convert a document using PrimoPDF converter. I would like it to load Primo PDF and attached the new pdf file to an email. The code I have so far will open Primo PDF and reset the printers back to normal but wont continue on to automatically convert it and attach it to an email. I will be using this alot and would like to cut out a few steps if I can.
Sub PDF_Converter()
'
' PDF_Converter Macro
'
ActivePrinter = "PrimoPDF"
I have an excel file that I want that a macro that I created in vba will run automatically when I open the file. I know there is an option using the: Private Sub workbook_open(). but I'm probably not using it correctly because it dosen't work.
I am working on an excel to get external data and compare them with the defined value. If the external data reaches the defined value, an alert email will be sent to a user-defined email address.
The question is how or is it possible for me to write a macro to automatically refresh and check the data for every minute or as user defined without pressing any buttons.
I am now trying to write a macro which is a little over my head and was hoping some one may have some idea how to do it or have some code that is similiar and I can try to customise it myself. So here goes.
Basically all that happens is I paste data into a work book that always has two columns. The first column is a list of names and the second column is a list of numbers. I need to sort that information automaitcally every time it is pasted into the work sheet as follows.
1) Once any information is pasted to sheet 1 run macro automatically with no user interaction
2) All numbers must be rounded up or down first before sorting. If it is say 2.4 then it would become 2 and it it was 2.6 it would become 3.
3) Then move the numbers only from a specified column from sheet1 to sheet 2 and split them up into seperate columns based on the following results.
a) 0 - 3 gets moved to column B b) 4 -7 get moved to column C c) 8 - 10 gets moved to column d
4) Delete both columns from sheet1 after this is run so the user can re paste new information
5) If a user does this again then do the same but move into a new set of columns e f g and so on until the work book ends.
I would like to run Macro_1 at every day 3.40pm. I have inserted following code to workbook.
Private Sub Workbook_Open() Dim when As Variant Dim name As String Dim torlance As Variant Application.OnTime when = "15:40:00", name = ("WeeklyStockReconciliation1") End Sub
I want to run a macro I created whenever there is a change to any cell on my worksheet (A1:IV65536). So, for example, if cell A1 were to change from a 1 to a 2, I would like my macro to run.
I have a sheet containing employee data - 13,000 rows - one for each employee.
Column A contains their store number (there are about 1300 stores in total) and column H contains their name.
Is it possible to create a macro that, for each change in store number, will create a named range for the employees' names in that store automatically?
There's a spreadsheet containing 2 Sheets, lets'say Sheet1 and Sheet2.
The first one, Sheet1 contains raw data (imported from a database through SQL), hence there are no formulas in it.
This sheet contains among several columns, this one labeled "PC" (column G), non-sequenced numbers only (ex., 14014, 14015, 14019, 14113)
The second sheet is used for retrieving some other information from Sheet1, based on PC number, which is input on cell Sheet2!P15, for authorization purposes only.
The fact is that I have to input every PC number, one by one (14014, 14015, 14019...) then send it to printer one by one by every PC number entered.
In this example, type 14014 in P15, then print button; again, 14015, then print button, and so on.
I'm wondering if there's any way, by selecting some (not all) PC numbers from Sheet1 (even when filter is set on), to have these different pages (Sheet2) printed automatically after pressing this macro button.
An extra bonus would be the possibility (other macro, possibly) to generate one or several pdf files of this selection.
I want to be able to run a macro automatically everytime I change a cell. For example, I have cell K1 and K2 that contain a date and a sales rep name. I want the macro to run automatically everytime I change either of these two cells. Is there any way to do this?
Is it possible to run the following macro automatically using VBA when cells B2 and C2 equals "Yes"? I don't want any manual intervention for this to happen.
Sub clearcells() ' ' clearcells Macro ' Macro recorded 14/10/2009 ' Selection.ClearContents Range("F3").Select Selection.ClearContents Range("G3").Select Selection.ClearContents Range("H3").Select Selection.ClearContents Range("H4").Select End Sub
Column A current Amount Column B Increse % Column C Revise Amount
If I put revise amount in column c, than Column B update automatically or if I put % in column B than column C update automatically, update must be live
I have some code that downloads prices for me in excel. However, instead of running this macro everytime I was wondering if it is possible to write a piece of code that would run this macro every x minutes?
Each worksheet has 4 days on it.. and there are 4 worksheets per month ( Jan1, Jan2, Jan3, Jan4 ). I have this macro which runs ( dependant on password ) to lock all cells so they cannot be edited after. On this macro I have to enter the month to lock and it adds on the 1,2,3,4.
Sub LockCell() Dim i As Integer Dim ws As Worksheet Const Pass = "password" Dim InptPass As String Dim Mnth As String
On Error Resume Next
InptPass = InputBox("Please Enter Password")
If InptPass <> Pass Then MsgBox "Incorrect Password", vbCritical Exit Sub Else...
I am trying to run a macro every 15 minutes after opening it. I did read something on here that helped me "http://www.ozgrid.com/Excel/run-macro-on-time.htm", but it only seemed to refresh at 15 minutes past the hour. Not at 00:30, 00:45, or 00:00.
how to alter this Private Sub for my code to execute automatically once all 3 cells have changed. At the moment it executes as soon as any of the 3 cells change.
How can I make a macro to automatically insert the information in a new cell (COMP OFFICE). See attached. I want create a macro that cell COMP CODE 1JFQ, 3NM, 1145, 1C1 automatically put "AFP 3" in cell COMP OFFICE, etc. See attached.
There are hundreds of different codes in cell COMP CODE that we are pulling from our main office and internally we have to create COMP OFFICE cell to group them for our own purposes. It take a lot of time for us to manually tag the codes to COMP OFFICE cell
I wrote code for a few macros in a "save as" or practice version of a spreadsheet. Once I got the bugs worked out on the practice book I pasted the code into the actual spreadsheet I want to use. The problem is that whenever I run one of the macros it opens the practice book that I was using when I wrote the code. There should be no need for this and I can't figure out why that's happening. The code doesn't mention any workbook by name so I don't know why it would want to open the practice book.
I'm trying to run a macro called ClearDataSoFar whenever I leave a sheet and come back to it. I think it needs to be within a Worksheet_Activate statement, but not sure how to flesh it out.
Code:
Private Sub Worksheet_Activate() Application.ScreenUpdating = False ClearDataSoFar Application.ScreenUpdating = True End Sub
Is it possible to jump from one cell to another once a certain number of lines/characters has been reached to continue entering information uninterrupted with a macro?
Example: Cell A37 holds 10 lines with 78 character spaces on each line. Anymore than that is hidden. I would like to jump to cell A61 automatically when A37 reaches that limit to continue entering information without having to stop and click on A61. Is this possible?
Is it possible to write a code that will automatically restart a PC when a STRING in CELL A1 is recognized? My cell A1 populates a user's USERNAME upon opening the workbook.
I have a list of diagnostic procedures, some of which are for the same patient. I need a macro that does the following: move every second procedure (a couple of cells per row) of one patient number (column B) next to (11 cells to the right and 1 row up) the first procedure. But only if there's less than 3 months between the procedures (dates are in column G) and if both procedures were on the same side of the body (left or right, column L) Is there a macro that can do this for me? Is there a macro that just moves a couple of cells in a row 11 cells to the right and 1 row up?
Is it possible to have a macro run when a date is changed each month instead of clicking on the button. I have a few macros that are ran each month in a spreadsheet (manually) but would I would like to have them run automatically when the date is changed in cell a4 each month. The date in cell a4 is always the last day of the month. Also the name of the workbook changes each month
In First Part I Have R1 1 -17 R2 20-22 I Want When I Write R1 1-17 in cells {B1:C1}And R2 20-28 In Cells {B2:C2} Start Automatically Write From 1-17 in Column E and 20-25 In Column F in The Same Manner You See in The Pic He Ignores F18,F19 And Start Counting From F20 And Then Color The Common Area Which {E18:F19}
And Make The Same With The Second Part The Pic Which {G1:I2}
I want to do now is link the code below to a drop-down menu I have created on one of the sheets in the workbook. I created this list using data validation and declared this drop-down menu as MIndex and the values to choice from are 0,1,2.
Does anyone know how I can link this drop-down menu to the macro. So basically once the drop-down menu is activated run this macro.
Sub SumMonthlyVol() Dim wSheet As Worksheet For Each wSheet In Worksheets Select Case UCase(Left(wSheet. Name, 2)) Case "AJ", "CJ", "PJ"
If (MIndex = 0) Then wSheet.Range("L52") = "= SUM(R33C4:R50C12)" Else If (MIndex = 1) Then wSheet.Range("L52") = "=SUM(R34C4:R50C12)" ......................