Jump to content


Microsoft Excel Saving macro


1 reply to this topic

#1 Vandalised

    Jedi In Training

  • Members
  • PipPip
  • 307 posts
  • Gender:Male
  • Location:UK
  • Interests:Most sports, football, cricket, hockey, tennis, golf. Web design, graphic design (photoshop) Socialising with friends, going to clubs, bars, concerts.

Posted 12 March 2008 - 01:49 PM

Hi all, noticed theres not a lot of questions relating to excel but there is no harm in trying :whistle:

I basically have the simple code to save a excel document as a value from a certain cell:

Public Sub SaveAsA1()
    ThisFile = Range("A1").Value
    ActiveWorkbook.SAVEAS Filename:=ThisFile
End Sub


This code is basically saving the excel document as the value that is in A1. So thats half way there, however i need to build on this. I need it to be able to save a specific sheet not the entire workbook AND save the sheet as a webpage, as well as being able to save the final document as the value in cell A1.

I will be using this as a macro, i think thats been explained well enough but heres an idea of the process:

Macro button is clicked > marco saves the sheet stated as a webpage and the file is named using the value in A1 it is also saved in a stated directory > the user can then open the directory and see that the sheet has been saved and is saved as a webpage

This is for my computing A levels, we have had to produce an invoice system. This macro will be saving the invoices as web based documents ready to be used in a online database.

Look forward to your replies :)

#2 Scythar

    Honored X Staff

  • Members
  • PipPipPipPip
  • 1,888 posts
  • Gender:Male
  • Location:Antwerp (Belgium)

Posted 13 March 2008 - 03:48 AM

got your pm;
looking into it,
BUT,
since its VBA, i am pretty sure its way over my head here... :(

everyone here will confirm: i am a code moron...

you know 1337, well erm... i am the NOT port in front of it... :P





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users