Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello. I am working with an excel worksheet and i need the following: 1. A function that allows me to display the date when the file was last modiffied. 2. A button that will open a save window at a predefinded path so that i can enter the file name and press save. 3 In this file i am working with links. I need another function with a button or something that will open a window to a predefined path so that i can select the file that i what the links to point and press ok or open. I need the last two functions because they would save a lot of time for me. Any help would be very much apreciated. Thank you!! -- adinic ------------------------------------------------------------------------ adinic's Profile: http://www.excelforum.com/member.php...o&userid=31529 View this thread: http://www.excelforum.com/showthread...hreadid=512215 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the workbook's module, put code that will post the date/time of the last
save in the before save event. In the example below the date and time are posted to cells A1 & A2 respectively: ================================================== ==== Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) ActiveWorkbook.Sheets("Sheet1").Range("A1").Value = Date ActiveWorkbook.Sheets("Sheet1").Range("A2").Value = Time End Sub ================================================== == -- Kevin Backmann "adinic" wrote: Hello. I am working with an excel worksheet and i need the following: 1. A function that allows me to display the date when the file was last modiffied. 2. A button that will open a save window at a predefinded path so that i can enter the file name and press save. 3 In this file i am working with links. I need another function with a button or something that will open a window to a predefined path so that i can select the file that i what the links to point and press ok or open. I need the last two functions because they would save a lot of time for me. Any help would be very much apreciated. Thank you!! -- adinic ------------------------------------------------------------------------ adinic's Profile: http://www.excelforum.com/member.php...o&userid=31529 View this thread: http://www.excelforum.com/showthread...hreadid=512215 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here's one that will save your file to a specified directory. You can place
this code in a general module and then assign it to a custom toolbar button, or a button that you place on the worksheet. ================================================== ==== Sub SaveMeHere() Dim strPath As String Dim strFileName As String On Error GoTo ExitSave strPath = "Your Full Path Goes Here" strFileName = InputBox("Enter the name you wish to save this file as.") ActiveWorkbook.SaveAs strPath & strFileName ExitSave: If Err.Number 0 Then If Err.Number = 1004 Then Exit Sub MsgBox "An error has occured trying to save your file." Exit Sub End If End Sub ================================================== ==== -- Kevin Backmann "adinic" wrote: Hello. I am working with an excel worksheet and i need the following: 1. A function that allows me to display the date when the file was last modiffied. 2. A button that will open a save window at a predefinded path so that i can enter the file name and press save. 3 In this file i am working with links. I need another function with a button or something that will open a window to a predefined path so that i can select the file that i what the links to point and press ok or open. I need the last two functions because they would save a lot of time for me. Any help would be very much apreciated. Thank you!! -- adinic ------------------------------------------------------------------------ adinic's Profile: http://www.excelforum.com/member.php...o&userid=31529 View this thread: http://www.excelforum.com/showthread...hreadid=512215 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thank you very much for the code you wrote. The save function worke like a charm.. But the last saved date didn't. And i don't know why. will keep trying -- adini ----------------------------------------------------------------------- adinic's Profile: http://www.excelforum.com/member.php...fo&userid=3152 View this thread: http://www.excelforum.com/showthread.php?threadid=51221 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello. Can someone please tell me how to make a function that wil import into my current worksheet certain cells from another xls file The thing is that i want to be able to select the folder and the fil from which i import data, because the file from which i import changes -- adini ----------------------------------------------------------------------- adinic's Profile: http://www.excelforum.com/member.php...fo&userid=3152 View this thread: http://www.excelforum.com/showthread.php?threadid=51221 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following code should get you started.
Dim FName As Variant Dim WB As Workbook Dim DestRng As Range FName = Application.GetOpenFilename("Excel Files (*.xls),*.xls") If FName = False Then Exit Sub ' user didn't select any file End If ' open the source workbook Set WB = Workbooks.Open(Filename:=FName) ' copy cell Sheet1!A1 from WB to ThisWorkbook WB.Worksheets("Sheet1").Range("A1").Copy _ Destination:=ThisWorkbook.Worksheets("Sheet1").Ran ge("A1") ' close the sourse workbook WB.Close savechanges:=False -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "adinic" wrote in message ... Hello. Can someone please tell me how to make a function that will import into my current worksheet certain cells from another xls file. The thing is that i want to be able to select the folder and the file from which i import data, because the file from which i import changes. -- adinic ------------------------------------------------------------------------ adinic's Profile: http://www.excelforum.com/member.php...o&userid=31529 View this thread: http://www.excelforum.com/showthread...hreadid=512215 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Than you very much for this code. But you forgot to tell me where to put it and how to use the function. I would apreciate that very much! Thank you! -- adinic ------------------------------------------------------------------------ adinic's Profile: http://www.excelforum.com/member.php...o&userid=31529 View this thread: http://www.excelforum.com/showthread...hreadid=512215 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Issues | Setting up and Configuration of Excel | |||
ALT-TAB Issues in Excel | Excel Discussion (Misc queries) | |||
After SP2, excel having issues | Excel Discussion (Misc queries) | |||
VBA - Excel issues | Excel Programming | |||
Excel 97 issues | Excel Programming |