Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-15-2010, 01:25 PM
mrphilk mrphilk is offline Removing `form buttons` in VBA? Windows XP Removing `form buttons` in VBA? Office 2003
Novice
Removing `form buttons` in VBA?
 
Join Date: Jul 2009
Posts: 8
mrphilk is on a distinguished road
Default Removing `form buttons` in VBA?

Ok im finally getting towards the end of my invoice spread sheet (thanks for your previous help everyone).

I now have 2 worksheets, 1 which will hold all data relevant to the customer (ie hours worked etc) and 1 which will hold data relevant to the office (hours worked + expenses, costing etc).

Now I need to save the first sheet as a new document, which is fine;

Sub savecustomercopy()

ActiveSheet.Copy

Dim newfile As String, ssno As String, eng As String, cust As String, loc As String

ssno = Range("J2").Value
eng = Range("E6").Value
cust = Range("e4").Value
loc = Range("j4").Value

cusfile = ssno & ", " & eng & ", " & cust & "_" & loc & " _Service Report_CUSTOMER COPY.xls"
ChDir _


"C:\Documents and Settings\KHS\Desktop\Drafts"
ActiveSheet.SaveAs Filename:=cusfile

ActiveWorkbook.Close

MsgBox "Customer Copy Created", vbInformation

This works fine but the problem is I have several `form buttons` on this sheet which I now need to remove from the final document.

Is there a way of removing these in VBA, either by deleting them or choosing not to save them?

Also, before the workbook closes I would like to change the view to `pagebreak view` so that the sheet is viewed on screen when the file is reopened. Is there a way to do this in VBA?

Thanks!!!!!!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing All Formating basscarp Word 0 01-31-2010 05:49 PM
Removing data between two characters Voodoo Child Excel 1 11-26-2009 01:39 PM
Applying And Removing Letterhead skoz55 Word 0 08-06-2009 10:22 PM
Removing image to a file jasnick Drawing and Graphics 0 10-06-2008 06:21 PM
command buttons ronf Excel 0 12-03-2005 06:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:38 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft