Go Back   Trackpads Community > General Discussions > Computer and Technology > Web Design

Web Design Forums and discussions on webdesign

Web Design

Reply
 
LinkBack Thread Tools
Old 10-04-2008, 03:15   #1 (permalink)
Enlisted Warrior
My Awards Rack
Total Awards:
My Mood
Status
cevaughn is offline
Post Count
3
My Photos
My Photos: 0
Member Flags
Undisclosed Undisclosed
My Referrals
My Referrals: 0
Personal Guestbook
Reputation +/-
cevaughn is an unknown quantity at this point
Other Swag
T-Bucks: 332.71
Bank: 0.00
Total T-Bucks: 332.71

 
Post Adding Formulas back into a VB copied sheet

I have absolutly no experience with VB but have copied various scripts from different sources to try to create a page that will copy itself from a button on another page in the workbook and remove the formulas and hyper links. The script below works fine, but I want to re-insert the formulas I had in column L22:L25 (either that or not remove them to begin with) at the time of the copy. I have Hyper links to other information on the sheet that I need to remove so I can send the sheet by e-mail. Any Ideas?


Option Explicit

Sub createpo()
Dim NewName As String
Dim nm As Name
Dim ws As Worksheet



With Application
.ScreenUpdating = False

' Copy specific sheets
' *SET THE SHEET NAMES TO COPY BELOW*
' Array("Blank P.O"))
' Sheet names go inside quotes, seperated by commas
On Error GoTo ErrCatcher
Sheets(Array("Blank P.O")).Copy
On Error GoTo 0

' Paste sheets as values
' Remove External Links, Hperlinks and hard-code formulas
' Make sure A1 is selected on all sheets
For Each ws In ActiveWorkbook.Worksheets
ws.Cells.Copy
ws.[A1].PasteSpecial Paste:=xlValues
ws.Cells.Hyperlinks.Delete
Application.CutCopyMode = False
Cells(1, 1).Select
ws.Activate
Next ws
Cells(1, 1).Select

' Remove named ranges
For Each nm In ActiveWorkbook.Names
nm.Delete
Next nm

' delete column N thru R
Columns("N:R").Select
Selection.Delete Shift:=xlToLeft


.ScreenUpdating = True
End With
Exit Sub

ErrCatcher:
MsgBox "Specified sheets do not exist within this workbook"
End Sub
cevaughn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Trackpads Information
Click to Visit
Old 10-05-2008, 07:08   #2 (permalink)
Enlisted Warrior
My Awards Rack
Total Awards:
My Mood
Status
cevaughn is offline
Post Count
3
My Photos
My Photos: 0
Member Flags
Undisclosed Undisclosed
My Referrals
My Referrals: 0
Personal Guestbook
Reputation +/-
cevaughn is an unknown quantity at this point
Other Swag
T-Bucks: 332.71
Bank: 0.00
Total T-Bucks: 332.71

 
Default Re: Adding Formulas back into a VB copied sheet

Gues I figured it out
cevaughn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
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
Adding Formulas to cevaughn Help & Suggestions Center 1 10-04-2008 00:13
adding data to sheet 2 from sheet 1 jegal76 Microsoft Applications 4 10-29-2005 14:03
Formatting text/formulas in sheet Utkarsh Microsoft Applications 3 05-12-2005 20:00
Help! Keep formulas from updating refs when copied?? Ed Microsoft Applications 7 02-23-2005 16:00
Adding hours and minutes in formulas Trish Microsoft Applications 3 06-16-2004 01:52


Community Information
Options
Quick Options
Trackpads Non-Commercial Ad
Copyright Information Click to Visit
Time
Server Time
All times are GMT -4. The time now is 08:46.
Copyright
Copyright Information
The header is based off of work by Vipixel.com and modified by this site. Trackpads and the Trackpads Logo are both Registered Trademarks of Jason Edwards and cannot be used without prior written permission.  The only exception is as a link back to this site. Trackpads is a private website run by a small legion of volunteers, 3 dogs, 12.5 cats and an army of small, super smart, bio-engineered mice with pointy hats and tutu's. Search Engine Friendly URLs by vBSEO 3.2.0 RC7
Archive Links
Archive Links
Page generated in 0.60985 seconds with 22 queries