LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
kilo1990
 
Posts: n/a
Default Macro to Prompt for File -- Neophite Needs HELP

I've been searching to try and fix this problem high & low on the
Internet, and I can't seem to get this sucker quite right. I know it's
an easy problem, but I have nil VBA knowledge, so this is nothing more
than a basic Macro.

I'm trying to automate my stock screening info as much as possible, and
I want to change the below Macro to prompt me for the CSV file name so
it's not linked to a certain file path. I tried to do the
GetFilenameOpen help dialogue in VBA, but I can't get it to work right.
ANY help would be greatly appreciated. Here's the code in the Macro:

Sub StockImport()
'
' StockImport Macro
' Macro recorded 09-12-2005 by
'
' Keyboard Shortcut: Ctrl+Shift+I
'
Workbooks.Open Filename:= _
"C:\Documents and Settings\MyName\My Documents\Money\Stock
Screener\Raw Screen Data.CSV"
Range("A2:N50").Select
Selection.Copy
Windows("Screen Research.xls").Activate
Range("A6").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("B4").Select
ActiveCell.FormulaR1C1 = [Now]
Range("B5").Select
Windows("Raw Screen Data.CSV").Activate
ActiveWindow.SmallScroll Down:=-33
ActiveWorkbook.Close
End Sub

I have lots more I want to do with this puppy, but I'm trying to take
baby steps...thanks SOOO much in advance (I've used alot of brain power
on this one)...

 
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
How to stop file open macro prompt after deleting all macros? twor57 Excel Worksheet Functions 2 November 29th 05 05:00 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
How to CANCEL file SAVE PROMPT when MACRO is running? Stuart Macro Muppet Excel Discussion (Misc queries) 3 August 11th 05 12:26 PM
How do I insert a prompt into an Excel macro? TangoHammer Excel Discussion (Misc queries) 1 August 4th 05 09:31 PM
Prompt for file name in a macro Louisville Cardinals Excel Discussion (Misc queries) 11 April 19th 05 02:39 PM


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