Simple VBA if

sassriverrat

Well-known Member
Joined
Oct 4, 2018
Messages
655
Brainfarting because obviously this isn't right. Ears are open.

THanks

Code:
    If Worksheets("Developer").Range("I46").Value = "'Network" Then        dpathname = cpathname
    Else: dpathname = bpathname
    End If
 
The debug piece of coding returned nothing
The debug.print piece of code cannot return nothing in your Immediate window if you have a sheet called Developer. Re-run and look again but if the message boxes "worked as intended" I don't see how you can have your previous statement "it's like it simply skipped over the whole dpathname."
 
Last edited:
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
It did....but I'm not sure why. Something has been buggy lately. As seen in another post, I have a cell that was
Code:
 ='Network"
with "general" formatting and it was still showing an equal to zero (0)....

Then there was a case where the workbook, when opening another workbook, caused all of excel to freeze. But these have been one-off occurrences, just as the code here seems to have been (because it's been working fine).....
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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