Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Abbie Cohen   on Jan 14 In MS Office Category.

  
Question Answered By: Sultana Tabassum    on Jan 14

I'm not sure why spaces would be causing the problem, but if you think
it is then you might want to try trimming the text. Try something like
this...

Dim str as String

With ActiveSheet.PageSetup
If Len(.CenterFooter) > 0 Then
str = Trim(.CenterFooter) & " Your Text Here"
.CenterFooter = str
End if
End With

When I ran a test with spaces, both with and without surrounding text
the above worked just fine by replacing the spaces with the text, or
simply removing them from the surrounding text.

Share: 

 

This Question has 9 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Selection Method of Worksheet class failed Or get search suggestion and latest updates.


Tagged: