melphillips Posted December 4, 2003 Posted December 4, 2003 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 Quote
Madz Posted December 4, 2003 Posted December 4, 2003 Dear You just need to create a Save Functions which takes a filename as input parameter and process the save functionality there 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 company's filename is saved. this can be done using DB or some other option. i hope you will understand C# code string strFileName,strComanyName,strNumber; strCompanyName = "GetCompanyName" strNumber = //Some Number from TextBox , strFileName = DateTime.Today.Year.Tostring() + "-CompanyName-" + strNumber I hope this will solve problem Quote The one and only Dr. Madz eee-m@il
Recommended Posts