View Single Post
 
Old 09-05-2014, 09:29 AM
gebobs gebobs is offline Windows 7 64bit Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default VBA to change shape rotation

I have a simple test and calculation.

Two variables:
* A2: Ship direction =rand()*360)
* B2: Wind direction =rand()*360)

One calculation:
* C2: Apparent wind direction (relative to the ship) =B2-A2+IF(A2>B2,360,0)

One button activating a macro that recalculates the ship and wind directions.

Pretty simple, but I'd like to fancy it up. I've put in three arrow shapes, one each for the ship, wind, and apparent directions. I'd like the macro to change the rotation of these based on the recalculated results.

I'm so rusty in VBA. Any help would be appreciated.
Attached Files
File Type: xlsm RWD.xlsm (16.2 KB, 19 views)
Reply With Quote