• Hi, I am the owner and main administrator of Styleforum. If you find the forum useful and fun, please help support it by buying through the posted links on the forum. Our main, very popular sales thread, where the latest and best sales are listed, are posted HERE

    Purchases made through some of our links earns a commission for the forum and allows us to do the work of maintaining and improving it. Finally, thanks for being a part of this community. We realize that there are many choices today on the internet, and we have all of you to thank for making Styleforum the foremost destination for discussions of menswear.
  • This site contains affiliate links for which Styleforum may be compensated.
  • STYLE. COMMUNITY. GREAT CLOTHING.

    Bored of counting likes on social networks? At Styleforum, you’ll find rousing discussions that go beyond strings of emojis.

    Click Here to join Styleforum's thousands of style enthusiasts today!

    Styleforum is supported in part by commission earning affiliate links sitewide. Please support us by using them. You may learn more here.

The Excel Questions Thread

Neo1824

Senior Member
Joined
Nov 23, 2006
Messages
630
Reaction score
1
OK I have one for you guys...

I figured out my earlier question, so now a slightly easier one. I have a macro assigned to a button in a worksheet. How do I disable the macro until 2 other cells in the same worksheet have a value <> "?" ?

Not sure if it matters, but this is Excel 2003

Thanks!
Jim
 

CunningSmeagol

Distinguished Member
Joined
Oct 15, 2006
Messages
3,882
Reaction score
20
Originally Posted by Neo1824
OK I have one for you guys...

I figured out my earlier question, so now a slightly easier one. I have a macro assigned to a button in a worksheet. How do I disable the macro until 2 other cells in the same worksheet have a value <> "?" ?

Not sure if it matters, but this is Excel 2003

Thanks!
Jim


You'll just have to modify the macro to check the two cells in question, and if they have "?", Exit Sub.

This is off the top of my head. There are probably errors, but you get the idea.

Code:
Sub Test

If Range("A1").Value = "?" or Range("B1").Value = "?" Then

Exit Sub

End If

Rest of code goes here...

End Sub​
 

Neo1824

Senior Member
Joined
Nov 23, 2006
Messages
630
Reaction score
1
Perfect! Exactly what I needed. Thanks!

So now a follow up. I have a spreadsheet with 10 tabs. Each has a table or chart in it. I'd like to automatically create a powerpoint preso with a slide for each tabs table/chart. Inserting each table/chart into powerpoint as a picture would be fine.

Is this difficult to do?
 

CunningSmeagol

Distinguished Member
Joined
Oct 15, 2006
Messages
3,882
Reaction score
20
Originally Posted by Neo1824
Perfect! Exactly what I needed. Thanks! So now a follow up. I have a spreadsheet with 10 tabs. Each has a table or chart in it. I'd like to automatically create a powerpoint preso with a slide for each tabs table/chart. Inserting each table/chart into powerpoint as a picture would be fine. Is this difficult to do?
Probably not too difficult, but I've never done it. I don't do much with ppt these days. You might try asking the Excel newsgroup. Those guys are much heavier than I am. PS I have a Chinese coworker who calls powerpoint "powerplant". That is #1 followed by "dramastically" and "scareful".
 

dsgNYC

Senior Member
Joined
Dec 9, 2008
Messages
422
Reaction score
1
So now a follow up. I have a spreadsheet with 10 tabs. Each has a table or chart in it. I'd like to automatically create a powerpoint preso with a slide for each tabs table/chart. Inserting each table/chart into powerpoint as a picture would be fine.
Copy from Excel, Edit --> Paste Special in Word (or PPT). You can play around with how you want it to look, but you can choose options that display the Excel data as:

a) A picture of the table ("Picture", "Bitmap")
b) An editable table format ("Formatted Text", "Unformatted Text", etc)
c) An Excel object, which allows you to format and play with the table within the Word document just like you normally would in Excel

You also have the choice to paste a linked version of your table so that any updates you make to the original Excel table are also updated automatically in the table that you pasted into your Word document. Instead of choosing the "Paste:" radio button on the Paste Special dialogue box, choose "Paste Link:". You can do the same copying and pasting in PPT.
 

vitaminc

Distinguished Member
Joined
Mar 23, 2008
Messages
2,398
Reaction score
5
Excel/Office 2007 and MSN Stock Quotes refuse to work together on my machine. Any insights?
 

Neo1824

Senior Member
Joined
Nov 23, 2006
Messages
630
Reaction score
1
Originally Posted by dsgNYC
Copy from Excel, Edit --> Paste Special in Word (or PPT). You can play around with how you want it to look, but you can choose options that display the Excel data as:

a) A picture of the table ("Picture", "Bitmap")
b) An editable table format ("Formatted Text", "Unformatted Text", etc)
c) An Excel object, which allows you to format and play with the table within the Word document just like you normally would in Excel

You also have the choice to paste a linked version of your table so that any updates you make to the original Excel table are also updated automatically in the table that you pasted into your Word document. Instead of choosing the "Paste:" radio button on the Paste Special dialogue box, choose "Paste Link:". You can do the same copying and pasting in PPT.

That definitely works but can I set it up in a macro to do automatically? I think I can have powerpoint open from a macro command. But how about copying and pasting the fomatted (to the page) image into PP? Would the recorder work?
 

CunningSmeagol

Distinguished Member
Joined
Oct 15, 2006
Messages
3,882
Reaction score
20
Originally Posted by Neo1824
That definitely works but can I set it up in a macro to do automatically? I think I can have powerpoint open from a macro command. But how about copying and pasting the fomatted (to the page) image into PP? Would the recorder work?

You could give it a try and report back. Then take the necessary code from the recorder and add variables where needed. I'm afraid I'm going to be of little help here.

Also, I will be out of town for the next 2 weeks.
 

dsgNYC

Senior Member
Joined
Dec 9, 2008
Messages
422
Reaction score
1
Originally Posted by Neo1824
That definitely works but can I set it up in a macro to do automatically? I think I can have powerpoint open from a macro command. But how about copying and pasting the fomatted (to the page) image into PP? Would the recorder work?

I'm not sure how to write macros that work between different Office applications (outside of Excel/Access). Let us know if you find out how to do it.
 

AgentQ

Senior Member
Joined
Sep 26, 2008
Messages
427
Reaction score
1
Originally Posted by dsgNYC
I'm not sure how to write macros that work between different Office applications (outside of Excel/Access). Let us know if you find out how to do it.

All Office apps have COM hook-ins that can be accessed from other Office Apps. Here's the PowerPoint object model. As long as you add the correct references, this shouldn't be too difficult:
http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

A quick google gives these two potentially useful links:
http://peltiertech.com/Excel/XL_PPT.html
http://www.mahipalreddy.com/vba.htm

smile.gif
 

Cior

Well-Known Member
Joined
Mar 20, 2009
Messages
74
Reaction score
0
Perhaps someone can explain where our problem is arising in the below scenario:

We have a spreadsheet that has three tabs. The first two tabs are protected and require a password to edit outside the unprotected areas (essentially a form). The third sheet is not protected but contains a macro that prompts for a password prior to viewing the sheet.

On sheet number one we have approximately 100 rows and 30 columns. The second (protected) and third (password macro'ed) sheet contain the same setup and pull the information typed into the first sheet.

Here is the dilemma:

We created a button (developer tab) to hide and unhide various rows depending on how much information the user has. The goal was that when the user clicked the button on sheet #1 it would hide those correlating rows on sheet #1 as well as sheet #2 and #3. To do this required another macro that would first unprotect (via the password) hide/unhide the rows/columns and then reprotect (with password). This worked correctly for the rows portion of our challenge. However for sheet one and two on the columns button attempt it worked, but it is not working on sheet #3 the macro password protected one when attempting to hide/unhide a series of connected rows (say M:O) after unprotecting.

And actually it works correctly with the rows but when attempting to do the same thing with columns the columns on the third sheet are not hidden/unhidden.

Any thoughts or ideas why this is not working correctly. Or why is would work with connecting rows but now connecting columns? Do the columns need to be the same on all 3 sheets?
 

CunningSmeagol

Distinguished Member
Joined
Oct 15, 2006
Messages
3,882
Reaction score
20
I am going out of town for 2 weeks w/o internet, so I probably won't get to this one, but I think it would be helpful to whoever decides to answer if you pasted your code.

Was the code created with the macro recorder or did you write it from scratch?
 

UpperWestie

Senior Member
Joined
Jul 10, 2009
Messages
493
Reaction score
0
Originally Posted by CunningSmeagol
Probably not too difficult, but I've never done it. I don't do much with ppt these days. You might try asking the Excel newsgroup. Those guys are much heavier than I am.

PS I have a Chinese coworker who calls powerpoint "powerplant". That is #1 followed by "dramastically" and "scareful".


That is Dramastically Scareful Powerplant...LMAO LMAO
 

dsgNYC

Senior Member
Joined
Dec 9, 2008
Messages
422
Reaction score
1

Featured Sponsor

How important is full vs half canvas to you for heavier sport jackets?

  • Definitely full canvas only

    Votes: 93 37.5%
  • Half canvas is fine

    Votes: 90 36.3%
  • Really don't care

    Votes: 27 10.9%
  • Depends on fabric

    Votes: 42 16.9%
  • Depends on price

    Votes: 38 15.3%

Forum statistics

Threads
507,007
Messages
10,593,498
Members
224,355
Latest member
ESF
Top