Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default PrintOut_Method

I need some help printing to a file.

I am trying to understand code written by someone else
(who is not available). I am using the Immediate Window,
but this Window only holds a limited amount of
information. I have inserted "Stop" commands, but I've
gotten confused trying to follow the code's logic. I've
inserted a LOT of Debug.print commands. Now, I'd like to
just print all the information to a file and study the
file.

I've tried the following code:

ActiveSheet.PrintOut

and the worksheet is printed on the printer.

Then I tried the following code:

ActiveSheet.PrintOut printtofile:=True,
prtofilename:="Print Out Method Example.txt"

VBA created the fle, but I do not get anything from the
worksheet. I do get all of the driver setup information
for every printer on the LAN I have access to.

Does anyone have any suggestions?

Thanks in advance,

Shorty

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default PrintOut_Method

Whats wrong with copy & paste? You can copy the code and whats in the Immediate window and paste them to a text file.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default PrintOut_Method

Thanks for the reply.

Copy & paste is one of the things I was doing. However,
the code has several layers of conditional logic (If,
ElseIf, etc). I had hoped by placing the Debug.print
statemments would allow me to follow what is going on.
The problem is the amount of data and calculation results
plus the jumping around in the ElseIfs. So, that is when
I went to the print to file. Problem is, it did not work.

Thanks again,

Jim
-----Original Message-----
Whats wrong with copy & paste? You can copy the code and

whats in the Immediate window and paste them to a text
file.
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default PrintOut_Method

Insted of using the Immediate Window for all the code, "step through" the
code (i.e., run the code using the F8 key. After each step you can review
the values of various variables.

--

Vasant


"Shorty" wrote in message
...
Thanks for the reply.

Copy & paste is one of the things I was doing. However,
the code has several layers of conditional logic (If,
ElseIf, etc). I had hoped by placing the Debug.print
statemments would allow me to follow what is going on.
The problem is the amount of data and calculation results
plus the jumping around in the ElseIfs. So, that is when
I went to the print to file. Problem is, it did not work.

Thanks again,

Jim
-----Original Message-----
Whats wrong with copy & paste? You can copy the code and

whats in the Immediate window and paste them to a text
file.
.



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



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

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

About Us

"It's about Microsoft Excel"