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


Hi,

I have a general file which will (potentially) be used by multiple
users.

My file imports data from different file formats & does some
comparisons.
In english, my code does the following;
1. "Select txt/xls file, copy contents"
2. "Select MyFile.xls, paste contents"

My issue is that if the excel file is not saved as MyFile.xls, then my
code _will_not_execute_.

Potential users _will_ save this file under different names.
How can I set it up so that while being saved under different
filenames, execution of code will still be ok?

Can you point me in the right direction?

Appreciate any help you can offer me


--
PLPE
------------------------------------------------------------------------
PLPE's Profile: http://www.excelforum.com/member.php...o&userid=23856
View this thread: http://www.excelforum.com/showthread...hreadid=383472

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Program execution prob

Have a look at this in your VBA help:

GetSaveAsFilename Method Example

This example displays the Save As dialog box, with the file filter set to
text files. If the user chooses a file name, the example displays that file
name in a message box.

fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="Text Files (*.txt), *.txt")
If fileSaveName < False Then
MsgBox "Save as " & fileSaveName
End IfMike F"PLPE" wrote
in message ...

Hi,

I have a general file which will (potentially) be used by multiple
users.

My file imports data from different file formats & does some
comparisons.
In english, my code does the following;
1. "Select txt/xls file, copy contents"
2. "Select MyFile.xls, paste contents"

My issue is that if the excel file is not saved as MyFile.xls, then my
code _will_not_execute_.

Potential users _will_ save this file under different names.
How can I set it up so that while being saved under different
filenames, execution of code will still be ok?

Can you point me in the right direction?

Appreciate any help you can offer me


--
PLPE
------------------------------------------------------------------------
PLPE's Profile:
http://www.excelforum.com/member.php...o&userid=23856
View this thread: http://www.excelforum.com/showthread...hreadid=383472



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Program execution prob


If i understand you question is that the user will be entering in dat
which will then be sent to you right?


What I did to accomplice this was to.

A) Write a macro which creates a blank workbook, which then copie
specific information which I have requested to be copyed and paste
into the blank workbook.
B) I then wrote a macro to save it to the floppy Drive (As I did no
want the user to save it to other directorys etc. or under differen
names) using values from cells as a name for the workbook or in you
case myfile.xls

C) Then a macro which just goes into the a: and sends me that file vi
email.

Hope that help

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=38347

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
prob with dates in VBA dee Excel Discussion (Misc queries) 3 March 4th 08 02:19 PM
Counting prob superkopite Excel Discussion (Misc queries) 13 January 23rd 06 09:18 AM
Excel Prob [email protected] Excel Programming 3 January 13th 05 07:44 PM
MsgBox execution sends program into design mode Jenn Excel Programming 2 April 14th 04 10:21 PM
merging excel program with tdc finance program judy Excel Programming 0 November 5th 03 08:01 PM


All times are GMT +1. The time now is 08:09 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"