Vba/vb6 Save as specefic sheet after edit

As-Salam Alaikom.

I'am using excell 2007 .

I  have userform to open specefic workbook and entry data on it.  I want after entry data in specefic sheet then Save a that sheet in (C:\file)  and manuel name..  

Saved file only data without format. ( formulaire)


Any Idea?  

Nassim amAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ste5anSenior DeveloperCommented:
Well, it's hard to tell what you all need:

Sheets("SheetName").Range("A1").Value = "Some text"
ActiveWorkbook.Save "Path\Filename.xlsx")

Open in new window

Nassim amAuthor Commented:
Hi again..  I already fill data in tablr only i want the save as buttom should open thz dialog file on (C:\file) where to to save it and  user write the name of file...
KoenChange and Transition ManagerCommented:
opening the save as dialog is the easy part...


this instruction will do that...the question is, how/when do you want this to happen ?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Nassim amAuthor Commented:
Thx Koen.

My userform is simple

1 buttom to fill data in specifi cells

.Range("a1").value = textbox1.value

2- buttom to print the sheet


3- buttom to save as the sheet As an archive in c:\file

( save as specefic sheet (test)  with saveas dialog wich give me the permessn to choose where to save and file name)
KoenChange and Transition ManagerCommented:
so, when you create the button it prompts you for a macro, click new and the developer window will open on a macro Sub ButtonX_Click() where X is a number dependent of the number of buttons you have.

In the macro write

done !

Sub Button1_Click()


End Sub

Open in new window

Nassim amAuthor Commented:

It open the saveas dialog but when i save the file..  It doesn't apper in the distination

Can i declare wish sheet to save as??  

For excamplr..  Sheeet1 . Sheet2 . Sheet3

Can i make the button saveas only the sheet3 ??
Nassim amAuthor Commented:
The first command is


I want after printing this sheet.. Saving it :)
automaticly after printung or in auther button..  The both is accepted
KoenChange and Transition ManagerCommented:
calling the save dialog from code is the same as when you hit the button... If you select a folder and save it there, it should show up afterwards...

then, next, you have to decide... either we call the save dialog box (giving the user the possibility to save however and where ever he wants) or we save it through code, where you decide what will be save and where it will be saved.

you can save only one sheet (or a selection of sheets), you can also move it to a new book (to get rid of the macro's) and save that one...

let me know what exactly you want...
KoenChange and Transition ManagerCommented:
Here is how I usually handle the saving of one or more sheets (and losing the macro's):

Dim MySheetNames() as string    'array to hold the sheet names

MySheetNames(0)= Firstsheet
MySheetNames(1)= secondsheet 'you have to put the value in somewhere in your code

' copy sheets and save
MyFilename = "All Project Fiches " & Format(Date, "yyyymmdd") & ".xlsx"
ActiveWorkbook.SaveAs Filename:=MyFilename, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KoenChange and Transition ManagerCommented:
I think it's fair tot say that I answered the question...
Nassim amAuthor Commented:
Sorry i lost connection for lo'g time brother..  Thank you very mush :) Allah bless you :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.