Microsoft Office





Microsoft Office is an integrated suite of applications that includes Outlook, Word, Excel, Access, PowerPoint, Visio and InfoPath, along with a number of tools to assist in making the individual components work together. Coding within and between the projects is done in Visual Basic for Applications, known as VBA.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have this code my form

Private Sub Form_Unload(Cancel As Integer)

If AllowClose = False Then
        Cancel = True
        MsgBox "Use the Form -> Close option to close this form"
        Me.Visible = True
    End If

End Sub
But when I use this code to close I get a run time error, ps I am new to access VBA

Private Sub Command0_Click()

On Error GoTo HandleError
    DoCmd.RunCommand acCmdSaveRecord
    DoCmd.Close acForm, Form_frm_two, acSavePrompt
    Exit Sub
    MsgBox Err.Description
    Resume HandleExit

End Sub
Office 365 Training for IT Pros
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

1) I was asked by my colleagues if when we add a new line, that it didn't go to the bottom, can it be coded to be alphabetized by the Employee name in the list(last name, first name).

2) I was asked if we could search and go right to a particular record in the form vs. scrolling. For example, I want to update only Sample 3. How can I bring that record up in the form? Can we put that name up, or some other unique ID like a phone number, that only the user would know?
Hi Experts,

I have an event that loads data from an Excel File into a Table.  The process works perfectly with the data from the first column of the Excel File written into the first column of the Table.

I would like to change this to load the first column of the Excel File into Column 10 of the Table.

Is there a way to do this?  i.e. Specify the Starting Column for the data to be inserted in the Table?

I am attaching the section of VBA code that currently does this.

Bob C.
For a better understanding please view the video provided.

Thank you for your time Expert Exchange helper and community.
Hello my peers,

I need your guidance and help please to amend the below code that I to include in additional filter requirements and to loop through all files in a folder and complete the below code to every workbook.

Code that i have tried amending is: ws.Cells(1, icol) = "SEL"

I need to add  "STORE" & "CATEGORY"

and finally to loop through all files in folder and complete the below code.


Data split into new worksheet with column data for  "SEL" & "STORE" & "CATEGORY" and finally to loop through all files in folder and complete the below code.

Sub parse_data()
Dim lr As Long
Dim ws As Worksheet
Dim vcol, i As Integer
Dim icol As Long
Dim myarr As Variant
Dim title As String
Dim titlerow As Integer
vcol = 4
Set ws = Sheets("Sheet1")
lr = ws.Cells(ws.Rows.Count, vcol).End(xlUp).Row
title = "A1:L1"
titlerow = ws.Range(title).Cells(1).Row
icol = ws.Columns.Count
ws.Cells(1, icol) = "SEL"
For i = 2 To lr
On Error Resume Next
If ws.Cells(i, vcol) <> "" And Application.WorksheetFunction.Match(ws.Cells(i, vcol), ws.Columns(icol), 0) = 0 Then
ws.Cells(ws.Rows.Count, icol).End(xlUp).Offset(1) = ws.Cells(i, vcol)
End If
myarr = Application.WorksheetFunction.Transpose(ws.Columns(icol).SpecialCells(xlCellTypeConstants))
For i = 2 To UBound(myarr)
ws.Range(title).AutoFilter field:=vcol, Criteria1:=myarr(i) & ""
If Not Evaluate("=ISREF('" & myarr(i) & "'!A1)") Then

Open in new window

I am at long last trying to learn VBA, and have a Kindle version of Excel VBA Programming for Dummies by John Walkenbach. I have followed exactly the instructions he gives for creating the simplest of macros to create my name and the date, in bold text and 16pt. I followed the instructions EXACTLY, and do not get the expected result. I attach my spreadsheet with this Question, and also a screenshot of the Visual Basic Editor shown in the Dummies book.
What have I done wrong? I want to be able to go through this book and learn VBA, but with this bad start I am already foxed.
Any ideas?Macro-Lesson-No.-1.xlsmThe 'Dummies' VB Editor page screenshot
Importing data into programs via Excel sheets. Sheets contain many columns, need to create "specs" in other programs referencing the row letters above column headings in order to match data with import.  How can I easily get the letters (or numbers) above my column headers to fill down into the first row of my sheet?  That way I could copy the two top rows that contain my headers and the letters above, and then paste and transpose, so I can use as a reference guide when completing the match up during the import process.
Hi all,

I have a client's pc with Office 365 Premium. I want to open an excel or word file in SharePoint which gives me an error. I looked into several option and it seems that the office activation is corrupt. See images. When I resubmit the account details it says it's logged on and when I close and open Excel or Word again it again gives these errors. I already tried installing Office again but it won't. I cannot find a solution for this so help is very appreciated.

Hi all,

Let's say I have a random list of items on a sheet:


What is the best and most efficient way to bring only the Fruit items into another sheet in the same workbook?
Secretary has publishing editor rights to mailbox and inbox for her attorney but can't delete emails now that she has been upgraded to Windows 10 Office 365 pro. What permissions allows deleting emails in inbox
NFR key for Veeam Backup for Microsoft Office 365
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Is it possible to have two MDM providers coexist in Office 365 for email?
I have a few resource mailboxes that are acting so weird. It's forwarding invites that are already on the calendar. User's aren't even touching the calendar or editing the calendar. Any help would be appreciated.

Thanks so much in advance.
Hi there,

I'm trying to setup a hybrid configuration with Exchange 2010 and Office 365 and I'm unable to complete the Office 365 Hybrid Configuration Wizard. I seem to have an error completing the wizard and I'm getting an error HCW8001. Looking through the Microsoft documentation, its saying that you need to enable Dirsync.

I've then connected onto the Azure AD shell and typed in Set-MsolDirSyncEnabled -EnableDirSync $true. From the Office 365 Azure AD dashboard, it's saying that AD sync is enabled.

What else can I do to get this part to work?


I can able to open chrome in vba but not able to click a button.

Could some please help me on this?

Button ID: tab-1195-btnInnerEl

Sub click()

'Set objgc = CreateObject("ChromeTab.ChromeFrame")
Shell ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" & " -url")
Shell ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" & " -url")
Application.Wait (Now + TimeValue("00:00:15"))

End Sub
Hi All,

Can anyone here please share some tips or steps in Group Policy in how to create the Outlook Email signature for each people in different OU ?

For Example: --> Email Signature Template ACC1. --> Email Signature Template IT1. --> Email Signature Template MRK1.

How to do that based on each OU ?

Note, the users are using various different OS and Office product like:
Operating System: Windows 7 and Windows 10
MS Office: 2010, 2013 and 2016 (some will use 64 bit, but majority is 32 bit)

Any help and guidance will be greatly appreciated,

Hey EE, I'm currently a little over my head in my a project for my work, what I'm trying to do is make an excel spreadsheet where after inputting how many of each product we need to make to reduce excess prep and wastage, for example 200 Ham Salad Sandwiches, the spreadsheet would in turn say how much of each ingredient would need to be prepped, each of our products have a set portion based off grams, then work out how much of that ingredient would fit into our Prep Tubs and how many tubs we would require each day, I've only recently started using Excel after about 10 years so my knowledge is spotty at best, any assistance would be appreciated.

I have an office 365 email account that have full access to 5 email accounts and about 200 GB(20 files) of pst files mounted on it.  The users have about 20GB of email box.  outlook is freezing when I open random emails.  No sure if it is the 20 pst causing the problem.  If i dismounted half of PST and it seems to move freely, not sure if there any documentation that may say having 200 GB mounted PST is a bad idea?  

Noted, have disable the share folder cache mode so the PST does not grow to a outrageous size.  

best regards
I had this question after viewing Find 10 closest x,y coordinates between two huge x,y data set.

I have an array of XY points corresponding to XY location on a grid.   There may be >100,000 entries.
I  want to compare the distance defined by Sqrt((X-Xa)^2 + (Y-Ya)^2) for a given point to every other point (row ) in the array and count the number with a distance less than some value I can define.
The output would just have the counts added to the XY data into another column for each row.
I'd need to do in excel.
NEED TO DELETE ROWS A-O in every csv in a directory , need a vba code to do this
On Demand Webinar: Networking for the Cloud Era
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Is there any way of setting an Office 365 policy so Outlook 2016 won't automatically delete emails in the deleted items folder after 30 days?

If this can't be done through the Office 365 website portal can it be done through the Power Shell?
I am not sure which version this started with, or if it is even related to the office version, but...  The scrollwheel moves the scrollbar, but the user cannot see the form scroll.  The record count in the popup changes, but no movement.  The same is the case when dragging the scrollbar.  However, the arrows at the top and bottom of the scrollbar still work.  This is an app that has been in use for many years.  There have been no dev changes.  I have only seen one unanswered posted in google about this.

We have two buildings connected with fiber.
building A VLANs –
Building B Vlans –
ShoreTel Director is on Vlan
All ShoreTel phones are working fine between buildings.
We also have a remote users connected via VPN routers from home offices as ShoreTel will not work with any NAT translation.
VPN IP starting from and up to
Remote office connected VPN (via remote cisco router to Building A router VPN)  can connect to any IP/Vlans from both buildings no problems.
While ShoreTel phones will connect fine between remote office and building A (when dialed by extension only) . W0hile when remote office (via VPN) will dial ShoreTel ext. in building B it will ring and connect the call, but there will be no voice will ring but once call connected it ShoreTel callers do not hear each other unless they will a dial full 10 DID number.
So This routing problem is only relevant to ShoreTel phone system calls (  I believe same is for  any other IP based phone system as initially when call placed phone system acts as an intermediary between to extensions until call is connected and then two extensions should talk to each other directly)
From remote VPN location to the Building B. If I check routing between ShoreTel vlan in building B and VPN Vlan I can communicate fine.
I am looking for the answer from an Expert with strong ShoreTel experience and not looking or random - Did you …
I have a client that has no electronic backup files for hard copies of booklets that require periodic changes. In fact, the problem is we don't know what format the original was created in. Some of these books have been around for years. We have a an old xerox scanner utilizing 'Document and Scan MakeReady' version software. We don't have the CD. It doesn't appear to be available - I assume it's really old. It is running on a Windows 2000 Pro PC. The value of this existing software, is it's ability to allow edits from a received  scan document without changing the original format. At this point - after edits, it can be printed prior to having to save it to a file format , like PDF or DOC. In other words, it allows you to cut/paste changes without altering the original format.

Does anybody have a low cost solution providing the above functionality? Is there an OCR out there that will allow you to make changes prior to committing to a file format.
Hello, we have documents that are in Word, Excel and PDFs that we sent to our trustees to sign.  They normally sign and scan the documents back to us via email.  However, we wish to change this so that they can digitally sign the documents (Word, Excel and PDF) and email to us.  What is the best way to do this?  Thanks.
I have 80 records with say columns 1-8 in worksheet 1. In worksheet 2, I have copied (linked) say columns 1-3 into worksheet 2. In worksheet 2, I then add columns  4-16 repenting the months Jan-Dec.

Now everything is OK until somebody sorts worksheet 1. Within worksheet 1 we use a value to assess priority and sanction projects. It is nice to sort ascending and we graph this. However, within worksheet 2 (when filter applied) the 80 records are adjusted for columns 1-3 but not for 4-16. I am surprised at this, but when I thought about it you are only linking back to data and not associating with the row in worksheet 2. Am I using the right approach - linking. I do not want to turn of filtering etc in worksheet 1.  Thanks in advance Paul.

Microsoft Office





Microsoft Office is an integrated suite of applications that includes Outlook, Word, Excel, Access, PowerPoint, Visio and InfoPath, along with a number of tools to assist in making the individual components work together. Coding within and between the projects is done in Visual Basic for Applications, known as VBA.