LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ryk Ryk is offline
external usenet poster
 
Posts: 36
Default Copy full sheet of just values and formates if possible, am I on the right track?

What I am doing should be very easy, but alas I am trying this vb thing
for just the second application. I have a main sheet that has formulas
throughout it, and want to make a macro or something in VB to just make
a copy of the sheet into a new sheet, including formatting etc but no
formulas. I need send copies of the sheet out and the size is too
large with formulas included. I managed to find this next bit, and
from what little I know I think it would do the trick....

Sub ValsOnly()
Dim Rng As String, r As Range
Dim wb As Workbook
Set r = Sheets("Sheet1").UsedRange
Rng = r.Address
Workbooks.Add -4167
Set wb = ActiveWorkbook
With wb.ActiveSheet
..Range(Rng).Formula = r.Value
End With
End Sub

(forgot who posted this, but I think name was William, too much surfing
for answers hehe so if it helps and poster sees this, many thanks)

I have tried this in 2 blank workbooks, but cannot get it to work at
all, I think I need more instruction on what names I need include, ie
sheet1, or range name etc. Also do i need to have a second workbook
open? Named?

Thanks in advance.....

Ryk

 
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:24 PM.

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"