Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-16-2014, 06:50 AM
orjanmen orjanmen is offline Multiple macros on same shortcut Windows 8 Multiple macros on same shortcut Office 2010 64bit
Novice
Multiple macros on same shortcut
 
Join Date: Jun 2014
Posts: 7
orjanmen is on a distinguished road
Default

This was really not easy. Programming in VBA is clearly not my strength. I tried to use your latest code, but it don't seem to be stable. After 10-20 executions, it stops working. Now I have made four macros, which I want into one "Select Case" (?). If you could do that for me, I would really much appreciate that! Have used 4 hour at work with this, but are about to give up.



Code:
Sub HvitBlatt()
ActiveDocument.Range.Font.ColorIndex = wdWhite
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(0, 0, 255)
ActiveDocument.Background.Fill.ForeColor.TintAndShade = 0
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid
End Sub '
 
'
'
'
Sub SvartGul()
ActiveDocument.Range.Font.ColorIndex = wdBlack
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(255, 255, 0)
ActiveDocument.Background.Fill.ForeColor.TintAndShade = 0
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid
End Sub '
 
'
'
'
Sub HvitSvart()
ActiveDocument.Range.Font.ColorIndex = wdBlack
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(255, 255, 255)
ActiveDocument.Background.Fill.ForeColor.TintAndShade = 0
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid
End Sub '
 
'
'
'
Sub SvartHvitt()
ActiveDocument.Range.Font.ColorIndex = wdWhite
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(0, 0, 0)
ActiveDocument.Background.Fill.ForeColor.TintAndShade = 0
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid
End Sub '
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple macros on same shortcut shortcut key to namebox? gsrikanth Excel 8 11-05-2022 04:10 AM
Multiple macros on same shortcut Document as shortcut? sparkync Office 3 08-04-2012 03:26 PM
Multiple macros on same shortcut office xp shortcut nja Word VBA 1 10-24-2009 05:07 AM
Where is the MS Office Shortcut Bar? vwm12345 Office 0 11-14-2008 04:30 AM
Style shortcut billzant Word 0 01-06-2007 02:13 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:13 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft