Excel Custom Lists?

gmooney

Active Member
Joined
Oct 21, 2004
Messages
254
Office Version
  1. 365
Platform
  1. Windows
I just created a custom list in an Excel file that I am using for a Slicer and pivot table filter.

I emailed the file to another person and the custom list did not transfer with the file?

How can I make sure that the custom list stays in the file?
 
Yes, you just need to specify the sheet when referencing the range.

VBA Code:
Application.AddCustomList ListArray:=Sheets("HiddenSheet").Range("A1:A5")
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Irobbo314 when I compile I get an error on the i with the For 1 =
 
Upvote 0
That means that you have 'Option Explicit' at the top of your code. It means that you need to declare all of your variables. You can either get rid of the option explicit or declare the i variable.

VBA Code:
Sub Example()
Dim i as Long

For i = 1 To Application.CustomListCount 'Get rid of other custom lists, catch errors for system lists
   Application.DeleteCustomList (i)
Next i

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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