More help for excel

melphillips

New member
Joined
Dec 3, 2003
Messages
2
Location
nc
Ok, is it possible to set a command button to throw up a save function and automatically create a file name?

For instance if i am saving all of my files in a folder where the files start with the name "03-NC1000 ABCCO" and the next job is saved as "03-NC1001 CDECO".

I would like to pull the 03 as the year, NC as the state generating the quote (NC,FL,TX, etc.) 1000,1001 (here is the sequential part) and ABCCO as the company name i am quoting.

The estimator will enter the State and Company name. I would like for excel to calc the rest.

I would like to have a command button to execute a save function and automatically save the file.


I am sure that this is simpler than i think, but i am having a hard time figuring it out.

If anyone is willing to help me, i would be most grateful.

Thanks,

Mel
 
Dear You just need to create a Save Functions which takes a filename as input parameter and process the save functionality there

C#:
private bool SaveFile (string FileName)
{
//Your code here
}

you just need to write code on Click Event of command button to create a file name

You also need to have some option buttons from where you should determine which companys filename is saved. this can be done using DB or some other option.

i hope you will understand C# code

C#:
string strFileName,strComanyName,strNumber;

strCompanyName = "GetCompanyName"
strNumber = //Some Number from TextBox , 
strFileName = DateTime.Today.Year.Tostring() + "-CompanyName-" + strNumber

I hope this will solve problem
 
Back
Top