assassin3212
New Member
- Joined
- Mar 23, 2011
- Messages
- 1
Hello everyone
I am pretty handy in Excel but have just started to dip my toes into VBA.
I have created a sheet where the user inputs their name in cell A1, and the date in DDMMYYYY format in cell 2. I then have a hidden cell (D40) with CONCATENATE formula to pull both of the above figures into one cell. I'd like to use this value as the file name when saving which will be saved in a folder on my Company's network drive. I'd like to add a button to do the below:
- 'Save As' the file on the shared area of the network:
//DFS/shared/finance_Monitoring_Software/FY11/New Attribute Values
- Save as with a file name of the value in cell D40
- Close the file down
I've come across the below on the 'net which does not seem to be working:
Sub SaveWithVariableFromCell()
SaveName = ActiveSheet.Range("D40").Text
ActiveWorkbook.Close Filename:="//DFS/shared/finance_monitoring_software/FY11/New Attribute Values" & SaveName & ".xls"
End Sub
Does the above look like it should work for me?
Huge thanks in advance
I am pretty handy in Excel but have just started to dip my toes into VBA.
I have created a sheet where the user inputs their name in cell A1, and the date in DDMMYYYY format in cell 2. I then have a hidden cell (D40) with CONCATENATE formula to pull both of the above figures into one cell. I'd like to use this value as the file name when saving which will be saved in a folder on my Company's network drive. I'd like to add a button to do the below:
- 'Save As' the file on the shared area of the network:
//DFS/shared/finance_Monitoring_Software/FY11/New Attribute Values
- Save as with a file name of the value in cell D40
- Close the file down
I've come across the below on the 'net which does not seem to be working:
Sub SaveWithVariableFromCell()
SaveName = ActiveSheet.Range("D40").Text
ActiveWorkbook.Close Filename:="//DFS/shared/finance_monitoring_software/FY11/New Attribute Values" & SaveName & ".xls"
End Sub
Does the above look like it should work for me?
Huge thanks in advance