Help with macro

T

Theslaz

I have a workbook with 5 pages ( I apologize if those are not the right
terms )

1 for "Reference tables"
1 for "Invoice data Entry"
1 for "Job Pending & Completion List"
1 for "Print Invoice"
1 for "Summary Statistics"

In the Print "Invoice page" it shows all the necessary information that
I need for the invoice retrieved from the "Invoice Data Entry" page.

What I would like to have is a button on my "Print Invoice" page that
would print the invoice ( print to fax ) and at the same time enter the
date under a column for "Date Sent" in the "Job Pending & Completion
List" page.

It appears what I have do do in my macro is to retrieve the Invoice
number from the "Print Invoice" page and search for that number in the
"Job Pending & Completion List" and then insert the proper date under
the "Date Sent" column in the row for that invoice number.

I have been entering this date manually; but all to often I forget and
than I wind up resending the fax. Employer at other end has no sense of
humor and gets very annoyed! Trying to eliminate that.
 
T

Theslaz

Simon said:
Like i said i'm not sure about your fax and i don't know the correct
name for that however if you set your default printer to be the fax you
can use this:


Code:
--------------------

Dim fRange As String
fRange = Sheets("Job Pending & Completion List").Cells.Find(What:=Sheets("Print Invoice").Range("I2").Value, _
After:=Sheets("Job Pending & Completion List").Range("A1"), LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Address
With Sheets("Job Pending & Completion List")
.Range(fRange).Offset(0, 7).Value = Date
End With
ActiveSheet.PrintOut
That worked. I will set the Fax printer as the "Default Printer"

I thank you.

Are you up for one more problem/item I would like to setup?

The HP printer that I use does not keep a copy of the actual fax that I
have sent. ( an older model Hp printer did and I used that feature a lot
) What I would like is to have a file generated showing only the
actual invoice and saved on my computer. I would like that file to be
named using the Invoice number and saved as a .CSV file. The file would
be saved to my "T" drive which is an external drive that I use for
backups. I could name the directory "Fax Backups"
 
T

Theslaz

Theslaz said:
That worked. I will set the Fax printer as the "Default Printer"

I thank you.

Are you up for one more problem/item I would like to setup?

The HP printer that I use does not keep a copy of the actual fax that I
have sent. ( an older model Hp printer did and I used that feature a lot
) What I would like is to have a file generated showing only the actual
invoice and saved on my computer. I would like that file to be named
using the Invoice number and saved as a .CSV file. The file would be
saved to my "T" drive which is an external drive that I use for backups.
I could name the directory "Fax Backups"
Problem. When I run the code; the Excel program hangs. It just sits at
the "Printing" dialog box and nothing happens. I tried to print the
invoice without using the code; and it printed no problem. I then tried
via the code and it hangs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top