Using Macro To Open Then Print A Webpage?

Dec 3, 2011

I am trying to use a macro in Excel to open a website (the URL is a named range in a worksheet) and then print the web page. I am able to open the webpage with the following code:

Sub View_Tech_Recalls()
Set ie = CreateObject("InternetExplorer.Application")
ie.navigate Range("Recall_URL")
ie.StatusBar = False
ie.Toolbar = True
ie.Visible = True
ie.Resizable = True
ie.AddressBar = False
End Sub

What do I need to add in order to print the open web page?

View 5 Replies


ADVERTISEMENT

Use Macro To Open Webpage?

Sep 23, 2013

I want to create a macro button that will open a specific webpage. In a cell. I need to press the CTRL + link to access the site, but within a macro I don't know

View 1 Replies View Related

Sending Data To Open Webpage

Jul 28, 2006

How do I send data via VBA from a spreadsheet to a webpage that is already open? I don't want to open another IE window. I just want to be able to navigate the IE window that is already open on my desktop. Also, in reference to the open webpage, with this particular webpage (secure site), when you enter data on 1 screen, it takes you to another screen with a different url where you have to enter a bit more data and then move to a third screen with a different url and enter the rest of the data and then submit. Is there a way in VBA to have one macro handle passing data to all 3 screens and submit the information?

View 4 Replies View Related

Pull Data From Open Webpage

Jan 23, 2008

At work we have a particular website open at all times. It pulls random data that is entered by another office and we then pull it up using a unique reference number generated. Is there anyway to create a macro that will scrape the data from this open page? I know that you can use the AppActivate command to set the focus on this particular page, but is there a way to get the data I need from there? I know you can bring up a new webpage with Set IE, but is there a way to use the Set IE with whatever page currently has the focus? Basically my project is if we see any errors, we have to pull up a form I made and enter the data manually. I am just hoping there is a way to scrape the basic information each time so we don't have to do it all manually.

View 4 Replies View Related

Write A Macro That Will Allow To Add Task To Webpage?

Mar 21, 2013

I am trying to write a macro that will allow me to add task to [url].... (task managing webpage) from data within excel. I could easily write a macro that emails the information to my toodledo email address, but this is not what I would like to do.ow to start the code utilizing Toodledo's API, which can be found here:

View 5 Replies View Related

Using Macro VBA To Select From Dropbox On Webpage

Nov 4, 2013

The thing is I can open ie explorer and navigate to the page I need. What I'd like to do is be able to select from a drop box on the web page when it's already open is this at all possible.

View 1 Replies View Related

Click On Webpage Link Through Macro In Excel?

Jan 29, 2013

I am trying to prepare macro to navigate web page and click on some tasks to complete it. As this web link is not access-able from outside or remotely. I am trying to work on it in bits. I have came across with a first problem of clicking on one of the link of this web page, below is the web page html source code. I want to click on last link "Total Outstanding Tasks".

HTML Code:
<td width="29%" nowrap>
<a id="A6" href="FindTask.aspx?StatusID=1,2,5,3&SLAhour=10&pageMnuOpt=4&mnuOpt=1|4&OtherMenu=true&SortOrder=1&CreatedBy=485&PreDefinedFilter=6&IsAssign=0" class="bodylink">Total Outstanding Tasks</a> </td>
<td width="29%" nowrap>
<a id="OutTasklnk" href="FindTask.aspx?StatusID=1,2,5,3&SLAhour=10&pageMnuOpt=4&mnuOpt=1|4&OtherMenu=true&SortOrder=1&AssignedTo=485&PreDefinedFilter=6&IsAssign=1" class="bodylink">Total Outstanding Tasks</a> </td>
<td width="29%" nowrap>

[code]....

View 1 Replies View Related

Macro To Print Sheets With Value In Cell A1 But Print Dynamic Ranges On Certain Sheet

Sep 24, 2013

I've found some code which works to print certain pages with value in cell A1 but I need to print dynamic ranges on some of the sheets as they will have filters on so the rows ranges will be different each time.

So far this is what I have but the dynamic range part is not working:

VB:
Sub Print_All_Worksheets_With_Value_In_A1()
Dim Sh As Worksheet
Dim Arr() As String
Dim N As Integer

[Code] ....

View 3 Replies View Related

Stop Print Macro Firing Before Print Event

Oct 18, 2006

I have a "submit" button macro which user would click after he has finished his input. This macro would update a reference number on the worksheet named "orange" and then print out this worksheet.

My purpose is "orange" is printed out with a reference number.

Below is the 1st code.....

View 9 Replies View Related

Open Print Dialog Box

Feb 23, 2010

I would like a macro to print 2 sheets in a workbook. I can write the macro that will select the sheets I want, but I don't want it to just go and print because depending on if the user wants it printed in color, b&w, etc.

they have to choose a different color. What code do I use to open the print dialog box?

View 2 Replies View Related

VBA To Open Print Window

Mar 23, 2012

This code takes all the data from a listbox and throws it into a sheet so that I can print it. I would like the print window to open ready to print this one sheet but allow the user to make sure the right network printer is selected before hitting print.

Code:
Private Sub cmdPrint_Click()
Dim i As Long
Dim ws As Worksheet
If Me.lstPrintRooms.ListCount = 0 Then
MsgBox "The are no rooms in the list to print"

[Code] .........

View 2 Replies View Related

Open, Print And Close

Apr 10, 2008

When i open an excel file, i need it to print 3 copies and then close itself without saving. This is because i have a file that must have 3 copies printed everyday. I know its lazy =) but i'm sure it will be very useful and i have seen it on a file before however i cannot successfully replicate it.

View 3 Replies View Related

Is There A VBA Way To Open Print Properties Dialog

Oct 19, 2007

I know I've seen where the print Dialog window can be opened.

Is there a way to open the Print PROPERTIES Dialog window?

View 9 Replies View Related

Prompt For Print Footer On Open

Aug 23, 2007

When a user Opens this particular Workbook I want them to put their name into an Input Box so that it appears on the Footer of each sheet. I have several Sheets in this particular Workbook. If they do not put there name in I want the workbook to close. I am having problems with the code I am using. Please see below:

Private Sub Workbook_Open()
Dim strName As String
strName = InputBox(Prompt:="Your Name Please.", _
Title:="Please Enter Your Name", Default:="Enter Name Here")

If strName = "Enter Name Here" Or _
strName = vbNullString Then
Exit Sub
Else: strName = vbNotNullString
Worksheets("Front Page").RightFooter = strName
End If
End Sub

As you can see I still need a code after the first IF statement to close workbook. My main issue is after the else.

View 2 Replies View Related

Option To Print - Use Print Macro

Dec 30, 2008

I have a few macros that run in a sheet. After the macros are finnished I would like to present to the user a msgbox that asks if they would like to print. if "Yes" is selected, the print macro runs. If "No" is pressed then nothing happens.

View 3 Replies View Related

Disable Print But Allow Print From Macro

Jun 11, 2007

I have found a macro which disables all print features in excel. I have rwo other codes to print. When I put this macro, It also disables the print from the other macro. How can I use this code so that normal print features will be disabled but if someone takes the print from the macros, Print will be allowed. The code which disables the print is given below:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If PrtOK Then
Cancel = False
Else
MsgBox "Can't print from here!"
Cancel = True
End If
End Sub

View 9 Replies View Related

Open Print Window To Change Printer And Select Number Of Copies?

Oct 5, 2011

The below code opens up the printpreview window. This does not allow to select the correct (or change) printer it will automatic use the default printer.

Is there a way for the code to open the print window so I can change the printer and select number of copies?

Code:

Sub Print_Button()
Dim ws As Worksheet, cell As Range
Set ws = Sheets("main")
Set cell = Range("g2000").End(xlUp)
Do Until cell.Value ""
Set cell = cell.Offset(-1, 0)
Loop
ws.PageSetup.PrintArea = ("A2:" & cell.Address)
ws.PrintPreview
End Sub

View 3 Replies View Related

Programmable Print Area: Macro To Set The Print Area According To The Amount Of Data In A Particular Range Of Cells

Feb 25, 2009

Using Excel 2003 I am trying to write a macro to set the print area according to the amount of data in a particular range of cells. I find I can include this instruction

View 2 Replies View Related

Macro -open The Look In List” And Stop So I Can Pick A File To Open

Oct 18, 2008

I want to create a macro that will “open the look in list” and stop so I can pick a file to open. I’ve tried to use “record a macro” and “ctrl-o”, but the record a macro won’t stop until I pick a file or cancel the file list. I also tried to use “o” in the short cut key box

View 5 Replies View Related

MacRO: Check If WorkBook Open. If Not, Open It.

Sep 27, 2006

I did a macro on my mac to transfer a sheet from one workbook to another worbook. It works very well when the destination workbook is open. Therefore I wanted to add some piece of code to check if the destination workbook is open. If not then I wanted the macro to open it before tranfering the sheet. Here is the code I´m using for tranfering the sheet

Sub Transfer_Sluttet()
If ActiveSheet.Index <> Sheets.Count Then
Application.DisplayAlerts = False
Set ws = ActiveSheet
Sheets(ws.Index + 1).Delete
ws.Move Before:=Workbooks("Sluttet.xls").Sheets("sheet2")
'Moves active sheet to beginning of named workbook.
'Replace Test.xls with the full name of the target workbook you want.
Application.DisplayAlerts = True
End If
End Sub

This is the type of macro I useually use on my pc to check if a workbook is open and if not then open it

If IsWorkbookOpened("Filename.xls", "C:Documents and ..................

View 3 Replies View Related

Refresh All Queries On Workbook Open When Finished Print To PDF Then Close Workbook

Jan 23, 2014

I have data that daily needs to be refreshed and printed to pdf.

I figure the simplest way to do this would be to task schedule the workbook to open daily. Then on open it will refresh the data, print it after all data has been refreshed and close the workbook.

I set it up originally without the need to print so I have all the queries set to refresh when opening the file, however when I now try and put the code to print to pdf on the workbook open event it runs before the queries are finished running. (Query notes: queries were created through Microsoft query, and are accessing a MySQL database queries set to refresh when opening the file queries set to enable background refresh).

View 4 Replies View Related

Macro Coding: Add A Code To The Sort And Paste Macro That Will Open The Second Spread Sheet

Jul 21, 2007

I am making a spreadsheet that sorts and pastes, but I need to know if I can add a code to the Sort and Paste Macro that will open the second spread sheet needed without just already having it open and using the

Windows("estimate sheet one.xls").Activate

View 2 Replies View Related

Excel 2003 :: Macro To Open Folder Then User Selects File Then Macro Continues To Run

Nov 6, 2011

I use Excel 2003 at work. I'm looking for some code that will Open a folder and then lets the user to select a file then continues to run the macro.

The file name they select will look similar to this K2271011.504 or K3011111.201

View 3 Replies View Related

Using If Within Print Macro?

May 28, 2014

The print area for each of the rows (summary tab) on the attached has been set up, though using button 3 we need to run the same print macro but ignore any rows (summary tab) that happen to be 0.

The attached sheet only gives two rows but there is a potential for up to 40 of them!

Would an IF function within the macro/code work?

View 14 Replies View Related

Macro For Print Out

Feb 6, 2010

I need a macro using a command button in sheet 2 that opens the "Print" window to print out the text in sheet 1 (after chosing printer manually of course). I also want a radio button in sheet 2 so I can select if I want to print out page 1-3 instead of page 1-2 in sheet 1.

View 2 Replies View Related

New Print Macro

Dec 12, 2006

What I would like to do is when I click on the print botton or select Print from the File menu, I would like to have a dialog box pop up with a YES botton and NO button asking the question "Would you like to print out the Medication Summary Page?". YES indicates to print off an additional worksheet and NO indicates just print the active sheet.

In the active sheet I have dropdown list in B6 to select a drug name to calculate IV medication drip rates. I also have other worksheets Named the same as in the list. For example, if you select D5W in the list, I have a worksheet named D5W. If you select YES in the message box, I would like to have the Active Sheet and the Medication Summary page print, ELSE just print the Active Sheet.

View 9 Replies View Related

Fix My Print Macro

Jul 24, 2007

I'm close - but I want the 'user' to be able to enter the number zero to either of my prompts without causing the macro to fail. Currently, if a user does not want to print any color copies (i.e. enters 0 - or B&W for that matter) the macro fails. Any ideas?

Sub Print_Report()
Dim CCopies, bwcopies As Integer

Copies = Application.InputBox("How many color copies?", Type:=1)
Copies = Application.InputBox("How many B&W copies?", Type:=1)
Sheets("YTD").PrintOut Copies:=CCopies, ActivePrinter:= _
"network_address_goes_here:", Collate:=True
Sheets("YTD Graph").PrintOut Copies:=CCopies, ActivePrinter:= _
"network_address_goes_here", Collate:=True
Sheets("YTD").PrintOut Copies:=bwcopies, ActivePrinter:= _
"network_address_goes_here", Collate:=True
Sheets("YTD Graph").PrintOut Copies:=bwcopies, ActivePrinter:= _
"network_address_goes_here", Collate:=True
End Sub

View 9 Replies View Related

Macro Print

Sep 7, 2007

I am wanting to add to my macro a print function.

I have a list of names in Col F

And the Cell A1 powers the data on the sheet.

I want the macro to say if C1 is then make C1=A1, if C1="",stop
and I want that to go on for C2, C3, C4, etc.

View 9 Replies View Related

Print To PDF Macro

Aug 20, 2009

I'm trying to write a macro which prints to PDF and I've been looking through all the posts currently on this forum to get something working. I'm using the following code -

Sub PrintPDF()
Filename = "C:Documents and SettingssambMy Documents" & ActiveSheet.Range("Z1").Value
SendKeys Filename & "{ENTER}", False
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Adobe PDF:", Collate:=True
End Sub

The macro prints to PDF, but then it stops at the Save As stage, where I have to manually enter the name of the file and click Save. I obviously want the macro to automatically name the file with the contents of cell Z1. I then want it to then automatically press enter.

View 9 Replies View Related

VBA Or MACRO PRINT THE JOB

Sep 30, 2009

I have a worksheet with blank tables on 2 template tabs named viz: ON BOARD and NOT ON BOARD, each with 3 sheets to print when viewed on print preview.

What I want is just print ONLY those sheets which have data filled in., i.e if I have data on 1 sheet out of 3 sheets, I want only 1 page to be printed, if there is data on 2 sheets then print only 2 and so on, from both the sheet tabs.

On Page Set up window, I have following specs:

On Page Tab: As follows

Orientation: Landscape

Adjust to: 75 % of normal size

Paper size: 8.5 X 14" Legal

On Sheet Tab:

Print Area A1:O51

Under Print titles:

Rows to repeat at top: $1:$6

These settings are standard for both the sheet tabs.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved