Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
neilwebb
 
Posts: n/a
Default automatic printing


hi there

using excel 97

i need to be able to print out automatically in excel once information
is inputted into excel from a software package called winwedge.

it is for measuring steel parts and once the operator has measured the
part, the measurement is automatically sent to excel.

it will enter excel into sheet 1. I then copy the data into sheet 2
=SUM(range!R[-2]C[-2]). what i want to happen is as soon as this
information is sent into sheet 2, i want it to print it out without
pressing any print buttons.

is this possible??

if anyone is kind enough to reply, please respond in basic text as i am
a bit of a beginner in excel programming. i presume that i have to input
macros and have a basic grasp of these.

if you wish to contact me email address is nwlyrose at aol dot com

many thanks


--
neilwebb
------------------------------------------------------------------------
neilwebb's Profile: http://www.excelforum.com/member.php...o&userid=24450
View this thread: http://www.excelforum.com/showthread...hreadid=382388

  #2   Report Post  
swatsp0p
 
Posts: n/a
Default


If you use a Worksheet_Change event macro, you can print anytime
anything changes on that sheet, e.g.

Private Sub Worksheet_Change(ByVal Target As Range)
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

To enter this code, right click on the desired sheet's tab and select
View Code. From the dropdown menu at the top right of the VBA editor
window that opens, choose "Change" and enter the above code.

Close the VBA window (Alt+Q) and send some data to your file. As soon
as your sheet is updated, it should print. Of course, this is untested
with your parameters, as I don't have WinWedge (although I have used
it...great program!).

Good Luck


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=382388

  #3   Report Post  
swatsp0p
 
Posts: n/a
Default


Right click on the tab for Sheet1 (the sheet that pulls the data from
Winwedge) and click on 'View Code'. The VBA window will open. At the
top right, click the dropdown that says General and choose Worksheet.
In the dropdown to the right, select 'Change'. The main window will
now show:

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub
------------------------------------
enter this code between the two lines of code above:

Sheets(2).Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets(1).Activate

the final product should look like this:
Private Sub Worksheet_Change(ByVal Target As Range)
Sheets(2).Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets(1).Activate
End Sub
Note: Sheets(2) is the number of the sheet in the workbook, not the
name on the tab! Adjust these references as needed.

Close the VBA Editor (Alt+Q) to return to your workbook.

Now, send data from winwedge and sheet2 should auto print.

Good Luck!

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=382388

  #4   Report Post  
swatsp0p
 
Posts: n/a
Default


You wrote:
hi bruce

thanks so much for the help with the automatic printing in microsoft
excel.

the code that you sent works a treat!! However......

it only works for the first time on a new sheet.

what i want to be able to do is import say 100 numbers per day and each
one of them print off individually. how do i get sheet 2 to print off
just the new data and not the other data??

i have enclosed a copy of the sheet that i have deigned. you will see
the red numbers on sheet 1. each of these numbers needs a seperate
print out, but we also need to keep the numbers for SPC and chart
values. i hope i am explaining this clear enough??

in summary

when winwedge inputs the data to excel, i need it to print that data on
sheet 2 - it does this now thanks to your code

what i now need it to do is be able to do that up to 100 times per day
and print out each individual value but also keep them all for SPC.

i hope you understand this, if not, please conact me with any
questions

regards


What you ask will require specific coding to read the current row, set
the print area to that row only, print the sheet then clear the print
area. You will need assistance from others in the forum with better
VBA skills than I possess. I am reposting this hoping someone will
jump in with some ideas.

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=382388

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic printing neilwebb Excel Worksheet Functions 1 June 21st 05 06:40 PM
find automatic page breaks Reason Excel Worksheet Functions 1 April 15th 05 06:03 AM
Cell borders printing black instead of grey julie@mwfc Excel Discussion (Misc queries) 1 February 23rd 05 12:19 AM
problem printing to PDF mark kubicki Excel Discussion (Misc queries) 1 January 21st 05 06:19 PM
Enable Double sided printing contiuously when printing multiple s. Lee Excel Discussion (Misc queries) 1 November 27th 04 01:58 AM


All times are GMT +1. The time now is 02:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"