ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro creating folder and files automatically, without permission. (https://www.excelbanter.com/excel-discussion-misc-queries/165266-macro-creating-folder-files-automatically-without-permission.html)

pokdbz

Macro creating folder and files automatically, without permission.
 
I'm using this macro:
Sub TwoPercentCheck()
i = 15
Do While Range("A" & i) < ""
If Range("A" & i).Value = 26001 Or Range("A" & i).Value = 26005 Or _
Range("A" & i).Value = 26007 Or Range("A" & i).Value = 26011 Or _
Range("A" & i).Value = 314001 Or Range("A" & i).Value = 315001 Or _
Range("A" & i).Value = 495001 Or Range("A" & i).Value = 835001 Or _
Range("A" & i).Value = 22801 Then
Else
If Range("B" & i) 0 Then
Range("K" & i) = Range("I" & i) / Range("B" & i)
Range("K" & i).Style = "Percent"
Else
Range("K" & i) = 0
End If
If Range("C" & i) 0 Then
Range("L" & i) = Range("J" & i) / Range("C" & i)
Else
Range("L" & i) = 0
End If
If Range("K" & i) = 0.02 Or Range("L" & i) = 0.02 Then
Range(Cells(i, 1), Cells(i, 12)).Interior.ColorIndex = 6
Range(Cells(i, 1), Cells(i, 12)).Interior.Pattern = xlSolid
End If
Range("K" & i).NumberFormat = "0.00%"
Range("L" & i).NumberFormat = "0.00%"
End If
i = i + 1
Loop
End Sub

When this macro starts for some reason it puts a Folder in the location
where the Excel Worksheet is named the same thing as the Worksheet. Inside
this folder. There are 2 files.
filelist.xml
editdata.mso

I have no clue why this is creating these items and would like to stop it.
If you have any idea on whats going on that would be great.

Dave O

Macro creating folder and files automatically, without permission.
 
That code contains no commands to create a folder, or copy a file, or
move a file, or write to a file, and contains no "calls" to other
routines that might create the folder or file. So I'm a little
perplexed.

If you delete the files and that folder, are they created anew when
you run this code? What are the creation dates of the files? Is is
possible that another routine calls this macro, and that other routine
might perform the file/folder creation?

DaveO
Eschew obfuscation



All times are GMT +1. The time now is 04:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com