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

i have a workbook that opens with scheduler and pulls data in, then sends to
printer, i have a macro that i call that coverts all formulas to values,
saves to a new file and then excel closes, my problem is that when i open the
saved filed that it created, it will run macro to convert values, print and
resave. is there something i can change so that the saved file will contain
only values and no modules to run?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default excel question?

You can use code at Chip Pearson's site to remove the modules:
http://cpearson.com/excel/vbe.htm

But you may find just creating a new workbook, then looping through each
worksheet and copying the data and paste special|values into that new workbook
is easier.

Mark J wrote:

i have a workbook that opens with scheduler and pulls data in, then sends to
printer, i have a macro that i call that coverts all formulas to values,
saves to a new file and then excel closes, my problem is that when i open the
saved filed that it created, it will run macro to convert values, print and
resave. is there something i can change so that the saved file will contain
only values and no modules to run?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default excel question?

Nope.

but it would look like:

dim wks as worksheet
dim newwkbk as workbook
dim newwks as worksheet
set newwkbk = workbooks.add(1)
newwkbk.worksheets(1).name = "deletemelater"
for each wks in activeworkbook.worksheets
set newwks = newwkbk.worksheets.add
newwks.name = wks.name
wks.cells.copy
newwks.range("a1").pastespecial paste:=xlpastevalues
'paste formatting, adjust row heights/columnwidths and tidy up???
next wks

application.displayalerts = false
newwkbk.worksheets("deletemelater").delete
application.displayalerts = true

newwkbk.saveas filename:=whateveryouwant,fileformat:=xlworkbookno rmal

Watch for typos--I composed in the email message.


Mark J wrote:

thanks for the info, do you have a example of that solution?

"Dave Peterson" wrote:

You can use code at Chip Pearson's site to remove the modules:
http://cpearson.com/excel/vbe.htm

But you may find just creating a new workbook, then looping through each
worksheet and copying the data and paste special|values into that new workbook
is easier.

Mark J wrote:

i have a workbook that opens with scheduler and pulls data in, then sends to
printer, i have a macro that i call that coverts all formulas to values,
saves to a new file and then excel closes, my problem is that when i open the
saved filed that it created, it will run macro to convert values, print and
resave. is there something i can change so that the saved file will contain
only values and no modules to run?


--

Dave Peterson


--

Dave Peterson
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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good davegb Excel Programming 1 May 6th 05 06:35 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 27th 05 07:46 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 23 April 23rd 05 09:26 PM


All times are GMT +1. The time now is 08:36 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"