Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Just wondered if someone could help me with what I'm sure will be an easy solution, but obviously hard if you don't know how. I have a spreadsheet with two worksheets, what I want to do is have a button on the first sheet that will save the second sheet as a seprate .xls or better still an html page using the value of a specific cell as the name of the file. i.e I have two worksheets, named sheet1 and sheet2 for example, if the value in cell A6 is 20040904 then clicking on a button on sheet1 would save sheet2 as 20040904.html or 20040904.xls is it possible and if so can someone please let me know how many thanks, Colin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim sStr as String
sStr = worksheets("sheet1").Range("A6").Value worksheets("Sheet2").Copy ActiveWorkbook.SaveAs "C:\Myfolder\" & sStr & .htm, FileFormat:=xlhtml ActiveWorkbook.close Savechanges:=False -- Regards, Tom Ogilvy "Colin" wrote in message ... Hi Just wondered if someone could help me with what I'm sure will be an easy solution, but obviously hard if you don't know how. I have a spreadsheet with two worksheets, what I want to do is have a button on the first sheet that will save the second sheet as a seprate .xls or better still an html page using the value of a specific cell as the name of the file. i.e I have two worksheets, named sheet1 and sheet2 for example, if the value in cell A6 is 20040904 then clicking on a button on sheet1 would save sheet2 as 20040904.html or 20040904.xls is it possible and if so can someone please let me know how many thanks, Colin |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom
many thanks for the reply, I'll give it a go, once again many thanks for taking the time to respond and offering your expertise. Colin *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
The SAVE AS button does not show save to G: drive | New Users to Excel | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
how to get disk icon on save button of save as dialog like 2000 | Excel Discussion (Misc queries) | |||
save as isnt there neither is the save button pressable | Excel Discussion (Misc queries) | |||
Can't save Excel using Save button, | Excel Discussion (Misc queries) |