VBA - is this possible?

KieranO

New Member
Joined
May 11, 2022
Messages
12
Platform
  1. Windows
Good day,

Being particulary new to vba i'm unsure whether this is doable or not. My situation is i have a report each week i have to complete - i gather data from 2 spreadsheets that are on sharepoint, format it and add them to my own, i then sort/filter the data and take secions of it (Top 5 highest/lowest) and copy them into a email to send.

I have the middle bit set up to a point that in my spreadsheet i get the data myself, put it on a specific sheet and my code formats the data, creates a new sheet for me and copies the data over to it. So my question is do you think its possible to automate the start and the end? breaking each step down it would consist of:
  • Accessing the sharepoint folder - I could potentially map the drive for this
  • Organising the folder newest first - this folder is updated daily so on the day of the report i would pick the newest file
  • Opening that file and copying the data i need (which is always in the same cells) over to my spreadsheet
  • My code would then format it as it already does.
  • Then, in a perfect world it would copy it over to a email (outlook) however this isnt a big deal.
Any advice would be appreciated

Enjoy your day
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Consider msoFileDialogFilePicker for 1st two points and the first part of third bullet (opening the selected file). Seems like you already have the copying/formatting code so you could integrate or call that as a separate sub. There are tons of existing code examples on how to send sheets or workbooks in an Outlook email.
HTH
 
Upvote 0
Consider msoFileDialogFilePicker for 1st two points and the first part of third bullet (opening the selected file). Seems like you already have the copying/formatting code so you could integrate or call that as a separate sub. There are tons of existing code examples on how to send sheets or workbooks in an Outlook email.
HTH

Thankyou for giving me a direction to look into, i appreciate your help :)
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top