Results 1 to 9 of 9

Specify size and location on screen of Notepad opened by VBA?

Threaded View

proepert Specify size and location on... 02-15-2010, 02:57 PM
Leith Ross Re: Specify size and location... 02-15-2010, 03:11 PM
proepert Re: Specify size and location... 02-15-2010, 04:38 PM
Leith Ross Re: Specify size and location... 02-16-2010, 11:17 PM
proepert Re: Specify size and location... 02-17-2010, 05:05 AM
Leith Ross Re: Specify size and location... 02-17-2010, 03:40 PM
proepert Re: Specify size and location... 02-17-2010, 04:29 PM
Leith Ross Re: Specify size and location... 02-17-2010, 04:42 PM
proepert Re: Specify size and location... 02-17-2010, 08:01 PM
  1. #1
    Forum Contributor
    Join Date
    11-17-2009
    Location
    PA USA
    MS-Off Ver
    Excel 2000
    Posts
    184

    Specify size and location on screen of Notepad opened by VBA?

    I'm using this code to open a text file. Is there a method to specify the size and location of the window that opens with the textfile?

    I'm sure there may be a better method to open the textfile, so feel free to tell me how bad this code is.

    Private Sub CommandButton2_Click()
    On Error GoTo ErrHandler
    Dim arr() As Variant, Pathh As String
         Pathh = ""
         i = 1
         Do
         ReDim Preserve arr(i)
         holder = Split(Environ(i), "=")
         If holder(0) = "HOME" Then Pathh = holder(1)
           i = i + 1
             Loop Until Environ(i) = ""
           If Len(Pathh) > 0 Then
             FileName = Pathh & "\ocean_def.txt"
           End If
         ActiveWorkbook.FollowHyperlink Address:=FileName, NewWindow:=True
         Exit Sub
    ErrHandler:
    Msg = "The User Defaults File Was Not Found."
    MsgBox (Msg), , "User Defaults File"
    Exit Sub
    End Sub
    Excel 2000

    Thanks for helping me.
    Last edited by proepert; 02-17-2010 at 08:02 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1