How to remove source code, hidden links, Formula links from excel

harikris2013

Board Regular
Joined
May 3, 2013
Messages
65
Hi,


I am running a macro for data in excel but it is leaving the source code, formula links and hidden links after removing the vba script.


Can any one help me with the solution how to remove all the links from the excel becoz i am sending these files to third party where some software is detecting all the source and links in excel


Thank you in Advance.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Have you already;

1) - Pressed Alt + F11 and removed any VBA code that tries to contact your companies servers
2) - copied and pasted (special values) so that no formulas remain?

for 2, to remove the manual element you can use the below

If you have hidden sheets, this VBA will unhide all sheets and remove all formulas


Sub UnhideSheets()
'Start looping through all worksheets
For Each WS In ThisWorkbook.Worksheets

'makes all sheets visible
Application.ScreenUpdating = False
If WS.Name <> "RandomText" Then
WS.Visible = xlSheetVisible
End If
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Next WS

End Sub
 
Last edited:
Upvote 0
Thanks for your response,

> i am copy pasting only values from macro sheet to ordinary workbook but when i send it to third party some software from there end is detecting the source code for all cells in excel.

Attaching snap shot for reference.

source-code-jpg.2753
 
Upvote 0
Im not sure what you mean by
"some software from there end is detecting the source code for all cells in excel."

Can you give an example





the snap shot is not appearing

You may have named ranges too, so try the below, this removes all formulas and named ranges

Sub UnhideSheets()
'Start looping through all worksheets
For Each WS In ThisWorkbook.Worksheets

'makes all sheets visible
Application.ScreenUpdating = False
If WS.Name <> "RandomText" Then
WS.Visible = xlSheetVisible
End If
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Next WS


' Deletes all named ranges

Dim NamedRange As Name

For Each NamedRange In ActiveWorkbook.Names
NamedRange.Delete
Next

End Sub


Thanks for your response,

> i am copy pasting only values from macro sheet to ordinary workbook but when i send it to third party some software from there end is detecting the source code for all cells in excel.

Attaching snap shot for reference.

source-code-jpg.2753
 
Upvote 0

Forum statistics

Threads
1,203,078
Messages
6,053,405
Members
444,662
Latest member
AaronPMH

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