Convert Cell Formula into VBA Application.WorksheetFunction

razzandy

Active Member
Joined
Jun 26, 2002
Messages
388
Office Version
  1. 2007
Platform
  1. Windows
Hi Guys

I am trying to find out how to use Application.WorksheetFunction. to simply use the =

I want to change this:
[a1] = "='C:\Users\Work\OneDrive\CloudStation\Systems\Stock Sync\[Stock Synchroniser.xlsm]MainCall'!$B$28"

Into something like this:
Variable = Application.WorksheetFunction.Equals("C:\Users\Work\OneDrive\CloudStation\Systems\Stock Sync\[Stock Synchroniser.xlsm]MainCall'!$B$28")


Is this possible?

Thanks in advance

;)
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
19,503
Try...

Code:
x = Application.ExecuteExcel4Macro("'C:\Users\Work\OneDrive\CloudStation\Systems\Stock Sync\[Stock Synchroniser.xlsm]MainCall'!" & Range("B28").Address(, , xlR1C1))

Hope this helps!
 

razzandy

Active Member
Joined
Jun 26, 2002
Messages
388
Office Version
  1. 2007
Platform
  1. Windows
Thanks Domenic, that works great :)

How did you find that? I have looked everywhere!


Try...

Code:
x = Application.ExecuteExcel4Macro("'C:\Users\Work\OneDrive\CloudStation\Systems\Stock Sync\[Stock Synchroniser.xlsm]MainCall'!" & Range("B28").Address(, , xlR1C1))

Hope this helps!
 

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
19,503
Thanks Domenic, that works great :)

You're very welcome!

How did you find that? I have looked everywhere!

This particular method was briefly mentioned in a book by John Walkenbach called "Excel Power Programming with VBA". In searching Google, I also found the following links...

https://docs.microsoft.com/en-us/pr...e/developer/office-2003/aa195716(v=office.11)

http://spreadsheetpage.com/index.php/tip/a_vba_function_to_get_a_value_from_a_closed_file/
 

razzandy

Active Member
Joined
Jun 26, 2002
Messages
388
Office Version
  1. 2007
Platform
  1. Windows
You're very welcome!



This particular method was briefly mentioned in a book by John Walkenbach called "Excel Power Programming with VBA". In searching Google, I also found the following links...

https://docs.microsoft.com/en-us/pr...e/developer/office-2003/aa195716(v=office.11)

http://spreadsheetpage.com/index.php/tip/a_vba_function_to_get_a_value_from_a_closed_file/

Thanks Again Domenic :)

I will take a good look at those links, thank you.

Is it Cold up there in Sunny Canada? Wet & Windy in the UK 10oc
 

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
19,503
10 degrees celcius? So it's warm there? :)

It's been brutally code here for the last week or two, with snow and icy conditions. At times, temperatures reached as low as -20 degrees celcius, -30 with the wind chill (if I remember correctly). Other parts of Canada got even lower temperatures. So yes, it's been fun. :)
 

Watch MrExcel Video

Forum statistics

Threads
1,129,803
Messages
5,638,448
Members
417,025
Latest member
MusterDuster

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
Top