PC Review


Reply
Thread Tools Rate Thread

Connect to intranet

 
 
Jaan
Guest
Posts: n/a
 
      19th Mar 2008
Hi
I am using code to log in our intranet
That works perfectly, but trouble is: I must insert my password manually.
How can I use vba to insert password automaticcaly.
I use code below
Sub TEST_UpDate()
Dim strFolderName As String
Dim Workbook As Workbooks


strFolderName = "Z:\Test"

On Error GoTo Err_Handler

Dim strFileName
With Application.FileSearch
..NewSearch
..LookIn = strFolderName
..Filename = ".CSV"
..SearchSubFolders = True
..Execute SortBy:=msoSortBySize

..LookIn = strFolderName
..Filename = ".CSV"
..SearchSubFolders = True
If .Execute(msoSortByLastModified, msoSortOrderDescending) > 0 Then
strFileName = .FoundFiles(1)

Application.Workbooks.Open strFileName


End If
End With
Exit_Sub:
Exit Sub
Err_Handler:
Resume Exit_Sub
End Sub
 
Reply With Quote
 
 
 
 
JP
Guest
Posts: n/a
 
      19th Mar 2008
What do you mean "intranet"? Is it a website? And you have to log in
to access it? Doesn't your co. have network shares that can be mapped
to local drives? Help us understand.


--JP


On Mar 19, 10:37*am, Jaan <J...@discussions.microsoft.com> wrote:
> Hi
> I am using code to log in our intranet
> That works perfectly, but trouble is: I must insert my password manually.
> How can I use vba to insert password automaticcaly.
> I use code below
> Sub TEST_UpDate()
> Dim strFolderName As String
> Dim Workbook As Workbooks
>
> strFolderName = "Z:\Test"
>
> On Error GoTo Err_Handler
>
> Dim strFileName
> With Application.FileSearch
> .NewSearch
> .LookIn = strFolderName
> .Filename = ".CSV"
> .SearchSubFolders = True
> .Execute SortBy:=msoSortBySize
>
> .LookIn = strFolderName
> .Filename = ".CSV"
> .SearchSubFolders = True
> If .Execute(msoSortByLastModified, msoSortOrderDescending) > 0 Then
> strFileName = .FoundFiles(1)
>
> Application.Workbooks.Open strFileName
>
> End If
> End With
> Exit_Sub:
> Exit Sub
> Err_Handler:
> Resume Exit_Sub
> End Sub


 
Reply With Quote
 
Jaan
Guest
Posts: n/a
 
      19th Mar 2008
Hi JP
Sorry for my unfinished definition
Yes we have shared network drive and the "Z" is it and I have access to log
in to it
I hope you understand what I mean and sorry for my english.Its not my daily
language


"JP" kirjutas:

> What do you mean "intranet"? Is it a website? And you have to log in
> to access it? Doesn't your co. have network shares that can be mapped
> to local drives? Help us understand.
>
>
> --JP
>
>
> On Mar 19, 10:37 am, Jaan <J...@discussions.microsoft.com> wrote:
> > Hi
> > I am using code to log in our intranet
> > That works perfectly, but trouble is: I must insert my password manually.
> > How can I use vba to insert password automaticcaly.
> > I use code below
> > Sub TEST_UpDate()
> > Dim strFolderName As String
> > Dim Workbook As Workbooks
> >
> > strFolderName = "Z:\Test"
> >
> > On Error GoTo Err_Handler
> >
> > Dim strFileName
> > With Application.FileSearch
> > .NewSearch
> > .LookIn = strFolderName
> > .Filename = ".CSV"
> > .SearchSubFolders = True
> > .Execute SortBy:=msoSortBySize
> >
> > .LookIn = strFolderName
> > .Filename = ".CSV"
> > .SearchSubFolders = True
> > If .Execute(msoSortByLastModified, msoSortOrderDescending) > 0 Then
> > strFileName = .FoundFiles(1)
> >
> > Application.Workbooks.Open strFileName
> >
> > End If
> > End With
> > Exit_Sub:
> > Exit Sub
> > Err_Handler:
> > Resume Exit_Sub
> > End Sub

>
>

 
Reply With Quote
 
JP
Guest
Posts: n/a
 
      19th Mar 2008
Not a problem Jaan. But I'm confused -- your company makes you log in
to access internal documents? You work there!

Sorry I can't help any further.

--JP



On Mar 19, 4:28*pm, Jaan <J...@discussions.microsoft.com> wrote:
> Hi JP
> Sorry for my unfinished definition
> Yes we have shared network drive and the "Z" is it and I have access to log
> in to it
> I hope you understand what I mean and sorry for my english.Its not my daily
> language
>
> "JP" kirjutas:
>
>
>
> > What do you mean "intranet"? Is it a website? And you have to log in
> > to access it? Doesn't your co. have network shares that can be mapped
> > to local drives? Help us understand.

>
> > --JP

>
> > On Mar 19, 10:37 am, Jaan <J...@discussions.microsoft.com> wrote:
> > > Hi
> > > I am using code to log in our intranet
> > > That works perfectly, but trouble is: I must insert my password manually.
> > > How can I use vba to insert password automaticcaly.
> > > I use code below
> > > Sub TEST_UpDate()
> > > Dim strFolderName As String
> > > Dim Workbook As Workbooks

>
> > > strFolderName = "Z:\Test"

>
> > > On Error GoTo Err_Handler

>
> > > Dim strFileName
> > > With Application.FileSearch
> > > .NewSearch
> > > .LookIn = strFolderName
> > > .Filename = ".CSV"
> > > .SearchSubFolders = True
> > > .Execute SortBy:=msoSortBySize

>
> > > .LookIn = strFolderName
> > > .Filename = ".CSV"
> > > .SearchSubFolders = True
> > > If .Execute(msoSortByLastModified, msoSortOrderDescending) > 0 Then
> > > strFileName = .FoundFiles(1)

>
> > > Application.Workbooks.Open strFileName

>
> > > End If
> > > End With
> > > Exit_Sub:
> > > Exit Sub
> > > Err_Handler:
> > > Resume Exit_Sub
> > > End Sub- Hide quoted text -

>
> - Show quoted text -


 
Reply With Quote
 
Jaan
Guest
Posts: n/a
 
      20th Mar 2008
Hi again
Thanks JP for your responde. I hope some solution must be.

I have discussed with our IT man and he told, that "Z:" is mapped network
drive.
To enter there I have username and password
Are this issue will kind of change my problem

Regards




"JP" kirjutas:

> Not a problem Jaan. But I'm confused -- your company makes you log in
> to access internal documents? You work there!
>
> Sorry I can't help any further.
>
> --JP
>
>
>
> On Mar 19, 4:28 pm, Jaan <J...@discussions.microsoft.com> wrote:
> > Hi JP
> > Sorry for my unfinished definition
> > Yes we have shared network drive and the "Z" is it and I have access to log
> > in to it
> > I hope you understand what I mean and sorry for my english.Its not my daily
> > language
> >
> > "JP" kirjutas:
> >
> >
> >
> > > What do you mean "intranet"? Is it a website? And you have to log in
> > > to access it? Doesn't your co. have network shares that can be mapped
> > > to local drives? Help us understand.

> >
> > > --JP

> >
> > > On Mar 19, 10:37 am, Jaan <J...@discussions.microsoft.com> wrote:
> > > > Hi
> > > > I am using code to log in our intranet
> > > > That works perfectly, but trouble is: I must insert my password manually.
> > > > How can I use vba to insert password automaticcaly.
> > > > I use code below
> > > > Sub TEST_UpDate()
> > > > Dim strFolderName As String
> > > > Dim Workbook As Workbooks

> >
> > > > strFolderName = "Z:\Test"

> >
> > > > On Error GoTo Err_Handler

> >
> > > > Dim strFileName
> > > > With Application.FileSearch
> > > > .NewSearch
> > > > .LookIn = strFolderName
> > > > .Filename = ".CSV"
> > > > .SearchSubFolders = True
> > > > .Execute SortBy:=msoSortBySize

> >
> > > > .LookIn = strFolderName
> > > > .Filename = ".CSV"
> > > > .SearchSubFolders = True
> > > > If .Execute(msoSortByLastModified, msoSortOrderDescending) > 0 Then
> > > > strFileName = .FoundFiles(1)

> >
> > > > Application.Workbooks.Open strFileName

> >
> > > > End If
> > > > End With
> > > > Exit_Sub:
> > > > Exit Sub
> > > > Err_Handler:
> > > > Resume Exit_Sub
> > > > End Sub- Hide quoted text -

> >
> > - Show quoted text -

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP Issue - Can Connect to Intranet, but not to Internet! Warren Windows XP Accessibility 0 22nd Aug 2008 10:56 PM
Can't connect to local intranet :-( Ed Flecko Windows Vista General Discussion 1 7th Aug 2007 11:19 PM
Unable to connect to intranet from IE qazmlp Windows XP Internet Explorer 1 2nd Dec 2003 04:41 PM
Unable to connect to intranet from IE qazmlp Microsoft Windows 2000 0 2nd Dec 2003 04:20 PM
how to connect to my intranet! kenny Windows XP Networking 1 29th Jul 2003 04:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:00 AM.