• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
You are here: Home
Lost password?
sp_Search
Advanced Search
Advanced Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search

Please confirm you want to mark all posts read

Mark all topics read

sp_MobileMenu Actions
Actions
sp_LogInOut
Log In
sp_Search

Search Forums

sp_RankInfo
Ranks Information
Avatar

New/Updated Topics

General Excel Questions & Answers

  Sick leave periods in one cell

  removing pesky hidden xml sheets in a workbook

  Excel Is Running Slow

  Quartile reporting

  Data Validation with unique values

VBA & Macros

  VBA to Have Template file remain Open after Copy is Saved &a…

  VBA Update the body from a template email

  Send Email Code Error

Power Query

  Converting Values from positive to Negative in Power Query

  Removing columns in Power BI source file

  How to add a new query for each cell of a column

  Source doesn't exist for Power Query folder

  Create list of working days

Power Pivot

   Problem in Runing Total using Pivot Table

Xtreme Pivot Tables

  Pivot Tables - Grand Totals AND Summary Percentages in the s…

Select Forum

  Rules and Guides

Forum Rules and Guides

  Public Forums - For Registered Users

General Excel Questions & Answers

Dashboards & Charts

VBA & Macros

Power Query

Power Pivot

  Course Members Only

Excel Dashboards

Power Query

Power Pivot

Xtreme Pivot Tables

Excel for Decision Making

Excel for Finance

Power BI

Excel

Word

Outlook

Excel Expert

Excel for Customer Service Professionals

Excel Analysis Toolpak

Excel Tables

Excel for Operations Management

Financial Modelling

Advanced Excel Formulas

Pivot Tables Quick Start

ForumsVBA & Macros
sp_TopicIcon
VBA; Creating a folder in Sharepoint.
Avatar
KENNETH BATILO
Posts: 27
Level 0
November 5, 2020 - 6:27 am

1

Hello all!

I'm trying to use MkDir to create a folder in SharePoint, but I'm getting a Run-time error '76': Path not found.  I've created a macro to save a copy of the file in that directory so I don't think the formatting is incorrect as far as spaces, slashes, etc.

Below is a sample code

NOTES:  On my actual document, I have the year in a range from a different sheet.  Below would be the result (just to make things simple) if it was a new year.  I've also tried the year with the slash after (/2020/) but still the same error.

 

Sub create_archivefolder ()

' Create year folder if needed

     Dim archive As String

     archive="https://company.sharepoint.com/teams/teamname/Shared Documents/General/report/Archive/2021" 'creates a new year

     On Error Resume Next 'Resumes if archive already exists

     MkDir (archive) 

End Sub

 

Thanks in advance!

Ken

Avatar
Miguel Santos
Posts: 80
Level 0
November 9, 2020 - 12:21 am

2
Good afternoon,

I don't know the answer, because I never used Sharepoint

but try to see if this can help you in any way

 

https://stackoverflow.com/ques.....sharepoint

 

Miguel,

Forum Timezone:
Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Riny van Eekelen, Ahmad Alkhuffash, Alexandra Radu, michael serna
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)

Devices in use: Desktop (11), Phone (4)

Forum Stats:
Groups: 3
Forums: 24
Topics: 6214
Posts: 27246
Member Stats:
Guest Posters: 49
Members: 31897
Moderators: 3
Admins: 4
© Simple:Press

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.