#1   Report Post  
Posted to microsoft.public.excel.misc
nathandaviesuk
 
Posts: n/a
Default OPen an DOS WIndow


I would like to create a button in a form in a spreadsheet then use some
vba code that will open a the command prompt window then automatically
enter "ipconfig" in the command prompt window to display my IP
address.

Many thanks


--
nathandaviesuk
------------------------------------------------------------------------
nathandaviesuk's Profile: http://www.excelforum.com/member.php...o&userid=10790
View this thread: http://www.excelforum.com/showthread...hreadid=495155

  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default OPen an DOS WIndow

Three steps:

1. Create a .bat file with
ipconfig /all
pause

2. Create a macro:
Sub Macro1()
x = Shell("cmd.exe /c C:\ip.bat", 1)
End Sub

3. Make a button and associate the macro with it.



--
Gary's Student


"nathandaviesuk" wrote:


I would like to create a button in a form in a spreadsheet then use some
vba code that will open a the command prompt window then automatically
enter "ipconfig" in the command prompt window to display my IP
address.

Many thanks


--
nathandaviesuk
------------------------------------------------------------------------
nathandaviesuk's Profile: http://www.excelforum.com/member.php...o&userid=10790
View this thread: http://www.excelforum.com/showthread...hreadid=495155


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
Can you open a new spreadsheet in a new program window? 3R''s Excel Discussion (Misc queries) 3 November 10th 05 12:59 AM
can't open new worksheets in a separate window 3R's Excel Discussion (Misc queries) 2 November 9th 05 02:33 AM
open file in different window Anna Excel Discussion (Misc queries) 1 April 25th 05 09:33 PM
open new window lost in excel Excel Discussion (Misc queries) 2 April 14th 05 11:08 PM
How do open each excel file in its own window pearcemi Excel Discussion (Misc queries) 2 March 10th 05 10:59 AM


All times are GMT +1. The time now is 07:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"