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: 1
Default Open a document using VBA


Hi,

This should be very simple, but it doesn't work for some reason! I'm
trying to open a file name when the user clicks on a command button and
here is the code I'm using:

Private Sub CommandButton1_Click()
Documents.Open ("C:\Test.doc")
End Sub

I've also tried using Application.GetOpenFilename, but still no joy.

Please help.

Many thanks,

Anar


--
anar_baku
------------------------------------------------------------------------
anar_baku's Profile: http://www.excelforum.com/member.php...o&userid=18259
View this thread: http://www.excelforum.com/showthread...hreadid=540260

 
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
document in xls and cannot open without a password. How to open? liha Excel Discussion (Misc queries) 2 February 11th 10 07:02 PM
I forgot my password to open an excel document, how do I open it? chris ohearn Excel Discussion (Misc queries) 1 August 11th 08 02:32 PM
my excel document won't open unless i go file, then open EB500 Excel Discussion (Misc queries) 1 June 3rd 05 06:42 PM
why must I open an Excel document twice to get it to open after . NottaBoy Excel Discussion (Misc queries) 1 May 17th 05 09:22 AM
When I open excel document it always ask if I want to open it in . dperkins Excel Discussion (Misc queries) 0 February 15th 05 08:11 PM


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