How to Download File from Password Protected SharePoint using VBA (CAC Login)?

cdh44

New Member
Joined
Feb 7, 2019
Messages
3
Experts,


I'm in the process of writing a couple of VBA scripts that will enable the user to download an Excel file from our password protected SharePoint site and import the data into the active workbook. I work for a government office, and our SharePoint site required a CAC login (CAC card must be inserted into computer). Upon navigating to the site, the Windows Security box pops up and requires a pin #. This workbook will be distributed to a couple of my co-workers.


I'd really prefer to not use SendKeys for obvious reasons. Is there any other way to do this?


I've accomplished this a number of times on non-government SharePoints, but am having some issues due to the CAC login. Any ideas?


Best,
Chris
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
18,952
Office Version
2013
Platform
Windows
I can't see how you would be allowed to access a protected site via Excel !!
The password requirements would still be required at the sharepoint entry !
 

cdh44

New Member
Joined
Feb 7, 2019
Messages
3
Hey Michael,

Sorry for not being clear. We all have individual PINs to access said SharePoint. The objective would be for the script to authenticate SharePoint access using our individual PINs (depending on who the user is at the moment), and then import the data. I imagine our PINs could be fed into a userform for the user to type in..
 

p7LCO46

New Member
Joined
Dec 11, 2019
Messages
1
Office Version
2016
Platform
Windows
Did you figure out the CAC authentication issue?
 

Watch MrExcel Video

Forum statistics

Threads
1,101,994
Messages
5,484,073
Members
407,427
Latest member
danbitton

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top