• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Size of excel worksheets in a workbook

Status
Not open for further replies.

vkaura

New Member
Hello!
I would like to find out the size of all the excel worksheets in a workbook. Someone posted this code as a solution:
When I run this, I get this error.

81744
What to do?
Thanks


---------------------------------
>>> use code - tags <<<
Code:
Sub ParseSheets()
Dim ws As Worksheet
Dim fPath As String

'Where to save sheets
fPath = ThisWorkbook.Path

Application.ScreenUpdating = False
For Each ws In ThisWorkbook.Worksheets
    ws.Copy
    Application.DisplayAlerts = False
    ActiveWorkbook.SaveAs fPath & "\COMPARE_" & ws.Name & ".xlsm"
    Application.DisplayAlerts = True
    ActiveWorkbook.Close
Next ws
Application.ScreenUpdating = True
MsgBox "Check out the COMPARE files in folder:" & vbNewLine & fPath
End Sub
 
Last edited by a moderator:

vletm

Excel Ninja
vkaura
Did You cross-post You thread somewhere else too?
You opened Your thread to Ask an Excel Question, instead of VBA Macros.
... in this time, this will move to correct Forum.

Are You sure that You pasted correct code?
... it copies ( ...copy ... SaveAs ... ) ... instead Your wish.

About Your What to do?
# Have You read Forum Rules?
... please, reread those.
# Get a correct code and test it.
# Open a new thread.
 

vkaura

New Member
Not sure why you are questioning the code I pasted.
Anyways....Thanks for moving my question to the right place.
It is Excel related - hence I posted under excel.
Do you have an answer ?
 
Last edited by a moderator:

Marc L

Excel Ninja
Hello !​
Why don't you better ask where you found this code ?!​
And rather than a mind readers forum guessing challenge as here this is just an Excel forum​
so explain at least which codeline rises the error …​
 

vkaura

New Member
it was a VBA macro to find sheet sizes for excel files. So where should it be posted - vba macros or excel or both? Enlighten me.
 
Last edited by a moderator:

vletm

Excel Ninja
vkaura
Did You try to read my #2 reply at all?
# Cross-posting?
# Your pasted code do not give sizes.
# Did You reread Forum Rules?
I tried to ask questions that I or someone else could help You...
without answers, it's a challenge to give answers for You.
 

vkaura

New Member
Hello !​
Why don't you better ask where you found this code ?!​
And rather than a mind readers forum guessing challenge as here this is just an Excel forum​
so explain at least which codeline rises the error …​
looks like my original post w/' the picture of error is invisible to people. Happy new year!
 

vkaura

New Member
vkaura
Did You try to read my #2 reply at all?
# Cross-posting?
# Your pasted code do not give sizes.
# Did You reread Forum Rules?
I tried to ask questions that I or someone else could help You...
without answers, it's a challenge to give answers for You.
I appreciate you asking questions. Happy new year!
 

Marc L

Excel Ninja
looks like my original post w/' the picture of error is invisible to people. Happy new year!
So you badly misread as your original picture does very not at all answer to my obvious question ‼​
Then according to your initial post guessing challenge I just can guess the code was not obviously made for you …​
Yes, happy new year !​
 
Status
Not open for further replies.
Top