Friday, March 4, 2016

How to Resolve - With VBA, I am trying to change the colors of auto shape to red, green, yellow on click.?

With VBA, I am trying to change the colors of auto shape to red, green, yellow on click.

I have created shape and try to change the colors from red, green, yello by clicking the shape.
I got certain logic,  but could not reach finall I wanted to do.
In fact, there are three modules like herebelow,  can you please give me some support on this issue.
Those all threes are not working.
 
 
one module
 
Sub trafficlight_cLICK()
With ActiveSheet.Shapes
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 2
End With
End Sub
Sub trafficlight2_click()
With ActiveSheet.Shapes
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 5
End With
End Sub
Sub trafficlight3_click()
With ActiveSheet.Shapes
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 11
End With
End Sub
 
 
2nd module
 
Private Sub CommandButton1_Click()
Dim col As Integer, c As Integer
col = Selection.ShapeRange.Fill.ForeColor.SchemeColor
For c = 1 To 30
    col = IIf(col = 30, 1, col)
        If col = c Then
          Selection.ShapeRange.Fill.ForeColor.SchemeColor = col + 1
        End If
 Next c
End Sub
 
 
3rd
 
Sub traffic_cLICK()
With ActiveSheet.Shapes
  Selection.ShapeRange.Fill.ForeColor.SchemeColor = 11
  Selection.ShapeRange.Fill.ForeColor.SchemeColor = 5

  Selection.ShapeRange.Fill.ForeColor.SchemeColor = 2
End With
End Sub
 
 
Thank you.

Anwsers to the Problem With VBA, I am trying to change the colors of auto shape to red, green, yellow on click.

Download SmartPCFixer for Free Now

Run CHKDSK

  • Go to the Start button.
  • In the Search box, type "cmd" (without quotes) and press Enter.
  • At the command prompt, type "chkdsk /r /f" (without quotes) and press Enter.
  • Reboot your computer.
An error might pop up:

"Access denied as you do not have significant privileges. You have to invoke this utility in elevated mode."

If you receive the above error message, it means you are not logged into you computer as an Administrator. If that's the case, follow these steps to run the command prompt in elevated mode:

  • Go to theStart button.
  • Go to "All Programs > Accessories" and right click on "Command Prompt".
  • Select "Run as Administrator".
  • In the Search box, type "cmd" (without quotes) and press Enter.
  • At the command prompt, type "chkdsk /r /f" (without quotes) and press Enter.
  • Reboot your computer.

Another Safe way to Repair the Problem: With VBA, I am trying to change the colors of auto shape to red, green, yellow on click.:

 

 

How to Fix With VBA, I am trying to change the colors of auto shape to red, green, yellow on click. with SmartPCFixer?

1. Click the button to download Error Fixer . Install it on your computer.  Open it, and it will perform a scan for your system. The junk files will be shown in the scan result.

2. After the scan is done, you can see the errors and problems which need to be repaired.

3. When the Fixing part is done, your computer has been speeded up and the errors have been fixed


Related: 1080p setting is gone in Windows Movie Maker After Windows8 1 KB2919355 x64 update installation having issue with the new windows start button and the menu search share start devices and settings is not showing anymore cannot access xp files on my external hd using Windows 7 Automatic Logon to Windows SharePoint Server C Windows svchost exe error message pops up everytime C Users user name AppData Roaming Microsoft Windows Start Menu Programs Startup Autoruns Disabled Computer freezes on boot up on both Windows Vista and after a fresh install of Windows 7 Cannot write message using Outlook Express and Windows Live Mail Daily BSOD s at random on Windows 7 x64 Computer with Windows XP will not recognize Comupluter on Network with Windows 7 Windows 7 sees Computers woth XP but cannont communicate with them Can Microsoft make a Windows 8 only for desktops laptops without the touch screen features Dell Inspiron 15 with Windows 7 having Startup issue with flicking Charms in Windows 8 1 Difference between Windows 7 Pro 32 64 bit to Windows 7 Pro OEM version Bing tabs on Windows Internet Explorer 8 DJ Inkers will not work on Windows 7 Is there a way to make it work,Can favorites be added to my Yahoo toolbar How I m using IE 8 0 6 and Windows 8 ati radeon hd 3200 graphics driver update How can I disable restarting of applications after Windows Update performs a reboot ati radeon hd 4800 driver PC crashed during Windows Experience assessment ati radeon drivers download Share Folders ain t accessible between three Windows 7 Ultimate Computers Pls Help ATI Display Driver Starting Problem with Windows 7 no icons appear ati radeon driver download Windows 7 icons there but doesn t display any words ati Windows old recovery of previous programs creative labs drivers four Make use of the “Tab” critical within the keyboard to select the USB flash drive.
Read More: -windows 8 change a document from chinese language? [Solved],How Can You Fix - All docs showing as Adobe PDFs; No Word docs?,Troubleshoot:Windows Update and THIS SITE ITSELF HAS A GLITCH Error,Header not showing using IE & google chrome,Windows 7 Failed to boot with Blue Screen Error.,registry edit or back up,How does my hard drive get fragmented?,Is it possible to shut the lid of your laptop, and not have your computer go into sleep or hibernation?

No comments:

Post a Comment