Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Connect to intranet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default Connect to intranet

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 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Connect to intranet

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 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default Connect to intranet

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 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 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 -


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Connect to intranet

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 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 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
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
Operning Intranet page Les Stout[_2_] Excel Programming 1 July 13th 07 06:09 AM
Hyperlinkingto an Intranet LPS Excel Programming 0 October 16th 06 08:10 PM
Javascripting over an Intranet Vaudeville Villain Excel Programming 0 August 14th 06 10:49 AM
VBA project in Intranet MVM Excel Programming 0 February 1st 05 11:01 PM
Using add-in through intranet Ajit Excel Programming 1 October 6th 04 09:39 PM


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