Personal add ins

neilkeron

New Member
Joined
Jul 26, 2007
Messages
13
I have written some of my own add-ins which I store on an external hard drive so that I am independent of the machine I am working at. However when moving to a different computer some of the add-ins try to find the file on a path to the c drive eg my persona add-in to find the last entry in a range of cells "lastlistentry" changes from = lastlistentry(J6:J754) to ='C:\Users\Neil\AppData\Roaming\Microsoft\Excel\XLSTART\myAddIns.xla'!lastlistentry(J6:J754)

Can anyone help to make this work on any computer

Thanks & Regards

Neil Keron
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Show your code.

Here is the code for the function I have used in my example:-


Public Function lastlistentry(myRange As Range)

myrows = myRange.Rows.Count
mystartrow = myRange.Row
mycol = myRange.Column
For i = mystartrow To myrows + mystartrow
' Debug.Print myRange.Rows
If Cells(i, mycol).Value <> 0 Then
lastlistentry = Cells(i, mycol).Value
GoTo 100
End If
Next i
100
End Function
But it is not the function I have the problem with. My add-in file is stored on an external hard drive. At home this is called the G: drive, at work it is called the F: drive. I'm not allowed to change the work drive letter and my home computer won't let me change that one to G: because all the lower letters are taken. When I run the add-ins on one computer, if I just enter the function name, all is fine. When I try it on the other computer, it adds a file path in front of the function name with the letter from the previous computer and says it can't find it. Even if I could get the external drive letter to be the same on these two computers, I want to have a general solution and be able to take my external hard drive to any computer and have the add-ins work without having to delete the incorrect file path from each cell in which the function is entered.

Any suggestions gratefully received.

Thanks & Regards

Neil Keron
 
Upvote 0

Forum statistics

Threads
1,224,520
Messages
6,179,267
Members
452,902
Latest member
Knuddeluff

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