LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default File Loading Problem

I have encountered an issue while trying to load a file using a macro.
I have used the code below, however, it always gives the "If" statement
regardless of whether the user selects a file and clicks open, double
clicks a file, or clicks cancel. I am trying to run the "If" statement
only if they click cancel. Any help would be greatly appreciated.
Thanks.

If UF < "" Then

MsgBox "No projection forms selected for Angie. You must add
them manually later."

Else

Workbooks.Open Filename:=UF

Set wbUF = Workbooks.Open(Filename:=UF)
UFFN = wbUF.Name

Sheets("Angie").Select
Sheets("Angie").Copy After:=Workbooks("Projection
Summary.xls").Sheets("Summary")
Windows(UFFN).Activate
ActiveWindow.Close
Windows("Projection Summary").Activate

End If


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
Solver model loading problem marineCORVETTEran Excel Discussion (Misc queries) 0 July 17th 08 11:31 PM
Click on file, Loading Excel problem Martin K. Excel Discussion (Misc queries) 2 June 3rd 07 07:54 PM
Excel XP Macro Loading Problem %P*Rr&^ Excel Programming 9 December 9th 03 09:12 AM
Excel XP Macro Loading Problem %P*Rr&^ Excel Programming 1 December 8th 03 08:32 AM
Excel XP Macro Loading Problem %P*Rr&^ Excel Programming 1 December 7th 03 11:52 PM


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