Convert Cell Formula into VBA Application.WorksheetFunction

razzandy

Active Member
Joined
Jun 26, 2002
Messages
390
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

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Try...

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

Hope this helps!
 
Upvote 0
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!
 
Upvote 0
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/
 
Upvote 0
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
 
Upvote 0
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. :)
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

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