Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 3 issues in excel


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,316
Default 3 issues in excel

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,316
Default 3 issues in excel

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 3 issues in excel


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 3 issues in excel


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 3 issues in excel

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 3 issues in excel


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Issues Tsintzina Setting up and Configuration of Excel 1 June 3rd 10 10:27 PM
ALT-TAB Issues in Excel Ron Z Excel Discussion (Misc queries) 6 February 13th 08 03:40 PM
After SP2, excel having issues Gopi Excel Discussion (Misc queries) 2 February 12th 06 12:29 PM
VBA - Excel issues Von Shean Excel Programming 2 August 24th 03 09:31 PM
Excel 97 issues Chris Gorham[_2_] Excel Programming 2 August 7th 03 10:24 PM


All times are GMT +1. The time now is 05:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"