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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 3 issues in excel

Adnic,

Put the following code in a general code module, not the
ThisWorkbook module or a sheet module:


Sub AAA()
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
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"adinic"
wrote in message
...

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



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 3 issues in excel


Thank you very much. It worked. I would need this function to open the
window at a predifined path. How can i do that?? Thank you so much for
all your help!


--
adinic
------------------------------------------------------------------------
adinic's Profile: http://www.excelforum.com/member.php...o&userid=31529
View this thread: http://www.excelforum.com/showthread...hreadid=512215

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 3 issues in excel


Thank you very much. It worked. I would need this function to open the
window at a predifined path. How can i do that?? Thank you so much for
all your help!


--
adinic
------------------------------------------------------------------------
adinic's Profile: http://www.excelforum.com/member.php...o&userid=31529
View this thread: http://www.excelforum.com/showthread...hreadid=512215



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 3 issues in excel

I don't understand your question.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"adinic"
wrote in message
...

Thank you very much. It worked. I would need this function to
open the
window at a predifined path. How can i do that?? Thank you so
much for
all your help!


--
adinic
------------------------------------------------------------------------
adinic's Profile:
http://www.excelforum.com/member.php...o&userid=31529
View this thread:
http://www.excelforum.com/showthread...hreadid=512215



  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 3 issues in excel


I am talking about the function that imports data from another xls file.
I created a button and assigned that function to it. When i click this
button a window opens. I need that window to open at a default path. I
want to do this because otherwise i would have to search for the file
from which i want to import the data. Is there anyway i could do that?
I found a way but it doesn't solve the problem
completely(Tools-options-general-default file location).

I have another question for you. I have a file to which i want to
import from another file certain cells. I want a function that will
allow me to select the row where i import the data. I atached a file
for you to see what i mean(i changed the extension to .doc;please
change it to xls). In that file i need cells
g11,h11,k11,l11,n11,o11,u11 to be replaced with cells from another
file. I need that for any row not only for row 11. This would make my
work a lot easier. Thank you very much!


+-------------------------------------------------------------------+
|Filename: indicatori.doc |
|Download: http://www.excelforum.com/attachment.php?postid=4370 |
+-------------------------------------------------------------------+

--
adinic
------------------------------------------------------------------------
adinic's Profile: http://www.excelforum.com/member.php...o&userid=31529
View this thread: http://www.excelforum.com/showthread...hreadid=512215

  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 3 issues in excel

If you talking about the file open window, you can change the
default open directory using code like


Dim Fname As Variant
ChDrive "H:" '<<< CHANGE
ChDir "H:\Test2" '<<< CHANGE
Fname = Application.GetOpenFilename()
MsgBox Fname


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"adinic"
wrote in message
...

I am talking about the function that imports data from another
xls file.
I created a button and assigned that function to it. When i
click this
button a window opens. I need that window to open at a default
path. I
want to do this because otherwise i would have to search for
the file
from which i want to import the data. Is there anyway i could
do that?
I found a way but it doesn't solve the problem
completely(Tools-options-general-default file location).

I have another question for you. I have a file to which i want
to
import from another file certain cells. I want a function that
will
allow me to select the row where i import the data. I atached a
file
for you to see what i mean(i changed the extension to
.doc;please
change it to xls). In that file i need cells
g11,h11,k11,l11,n11,o11,u11 to be replaced with cells from
another
file. I need that for any row not only for row 11. This would
make my
work a lot easier. Thank you very much!


+-------------------------------------------------------------------+
|Filename: indicatori.doc
|
|Download: http://www.excelforum.com/attachment.php?postid=4370
|
+-------------------------------------------------------------------+

--
adinic
------------------------------------------------------------------------
adinic's Profile:
http://www.excelforum.com/member.php...o&userid=31529
View this thread:
http://www.excelforum.com/showthread...hreadid=512215



  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 3 issues in excel


Thank you! It worked! But what about the other thing ? I searched th
internet but wasn't able to find anything helpful.If you could help on
last time i would be very grateful! Thank you

--
adini
-----------------------------------------------------------------------
adinic's Profile: http://www.excelforum.com/member.php...fo&userid=3152
View this thread: http://www.excelforum.com/showthread.php?threadid=51221

  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 3 issues in excel


Ok. In the file called indicatori i want the cells g11
h11,k11,l11,n11,o11,u11 to be replaced with the same number of cell
from another file. And the same thing for row 12, 13, 14..... The fil
from which i import will change all the time, but it will have the sam
layout, so the reference to the cells in that file will remain. So
would need a vba function to assign to a button. By pressing the butto
i would need an open window to open a predifined path, i would selec
the file from which i import the data and that is pretty much it!
cannot explain better what i need. Thanks for any help

--
adini
-----------------------------------------------------------------------
adinic's Profile: http://www.excelforum.com/member.php...fo&userid=3152
View this thread: http://www.excelforum.com/showthread.php?threadid=51221



  #16   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 3 issues in excel


Nobody knows how to do this??:(


--
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 01:13 PM.

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"