New Posts  All Forums:Forum Nav:

Need help

post #1 of 6
Thread Starter 
Hi

Since I'm not a heavy programmer things kind of stopped for me when i realised that i had to write some code in Excel in order to get some buttons to do some commands.
So I'm just hoping that some of you have time time to check out this "simple" code and explaine what each line does

thx i advance

CODE:
seksfot Makro
Makro registrert 12.02.2002 av Maskin

Sheets("Deck cargo").Select
Range("G3").Select
ActiveSheet.Shapes("Rectangle 1").Select
Selection.Characters.Text = "6 fot"
With Selection.Characters(Start:=1, Length:=5).Font
.Name = "Arial"
.FontStyle = "Normal"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Copy
Sheets("Deck Cargoplan").Select
Range("BH30").Select
ActiveSheet.Paste
End Sub
Sub nifot()

nifot Makro
Makro registrert 12.02.2002 av Maskin



Sheets("Deck cargo").Select
ActiveSheet.Shapes("Text Box 3").Select
Selection.Copy
Sheets("Deck Cargoplan").Select
Range("BH28").Select
ActiveSheet.Paste
End Sub
My System
(14 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom X6 1090T BE Asus Crosshair Formula V XFX 8800GTS 640Mb Corsair XMS3 1600MHz DDR3, 4GB, CL9 (4x2GB) 
Hard DriveOSOSMonitor
3x80GB+320GB Linux mint Win 7 Ultimate Benq 24" 
KeyboardPowerCaseMouse
Logitech Dinovo Edge Corsair AX 1200 Cooler master Storm Trooper Logitech G7 Wireless 
  hide details  
Reply
My System
(14 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom X6 1090T BE Asus Crosshair Formula V XFX 8800GTS 640Mb Corsair XMS3 1600MHz DDR3, 4GB, CL9 (4x2GB) 
Hard DriveOSOSMonitor
3x80GB+320GB Linux mint Win 7 Ultimate Benq 24" 
KeyboardPowerCaseMouse
Logitech Dinovo Edge Corsair AX 1200 Cooler master Storm Trooper Logitech G7 Wireless 
  hide details  
Reply
post #2 of 6
Quote:
Sheets("Deck cargo").Select
- Selects the worksheet named Deck Cargo
Quote:
Range("G3").Select
- Selects range G3 on that sheet
Quote:
ActiveSheet.Shapes("Rectangle 1").Select
-Also selects the shape named Rectangle 1
Quote:
Selection.Characters.Text = "6 fot"
-Adds the words "6 fot" to the selection
Quote:
With Selection.Characters(Start:=1, Length:=5).Font
.Name = "Arial"
.FontStyle = "Normal"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
- changes font for the text
Quote:
Selection.Copy
- copies the selection to the clipboard
Quote:
Sheets("Deck Cargoplan").Select
-Selects the worksheet named Deck Cargoplan
Quote:
Range("BH30").Select
-Selects range BH30 on that sheet
Quote:
ActiveSheet.Paste
- Pastes the content of the clipboard to that range


Quote:
Sub nifot()

nifot Makro
Makro registrert 12.02.2002 av Maskin



Sheets("Deck cargo").Select
ActiveSheet.Shapes("Text Box 3").Select
Selection.Copy
Sheets("Deck Cargoplan").Select
Range("BH28").Select
ActiveSheet.Paste

This one selects the same sheet and copies text box 3 and then pastes it to the range named BH28 on the deck cargoplan sheet.

Hope this explains it a bit.
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom 9600 BE Asus M3A32-MVP Deluxe Watercooled Saphire 1GB 3870 X2 4 GB DDR2 800 OCZ HTC Reaper 
Hard DriveOptical DriveOSMonitor
2 x WD 500GB SATA 2 2 x SATA DVD-RW Vista Ultimate 32" HD TFT on HDMI 
KeyboardPowerCaseMouse
Saitek Eclipse II Zalman 850 Watt Heatpipe cooled Gigabyte Mercury 3D Genius Navigator 525 
Mouse Pad
Desk 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom 9600 BE Asus M3A32-MVP Deluxe Watercooled Saphire 1GB 3870 X2 4 GB DDR2 800 OCZ HTC Reaper 
Hard DriveOptical DriveOSMonitor
2 x WD 500GB SATA 2 2 x SATA DVD-RW Vista Ultimate 32" HD TFT on HDMI 
KeyboardPowerCaseMouse
Saitek Eclipse II Zalman 850 Watt Heatpipe cooled Gigabyte Mercury 3D Genius Navigator 525 
Mouse Pad
Desk 
  hide details  
Reply
post #3 of 6
Thread Starter 
Thanks for that,helps me alot
My System
(14 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom X6 1090T BE Asus Crosshair Formula V XFX 8800GTS 640Mb Corsair XMS3 1600MHz DDR3, 4GB, CL9 (4x2GB) 
Hard DriveOSOSMonitor
3x80GB+320GB Linux mint Win 7 Ultimate Benq 24" 
KeyboardPowerCaseMouse
Logitech Dinovo Edge Corsair AX 1200 Cooler master Storm Trooper Logitech G7 Wireless 
  hide details  
Reply
My System
(14 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom X6 1090T BE Asus Crosshair Formula V XFX 8800GTS 640Mb Corsair XMS3 1600MHz DDR3, 4GB, CL9 (4x2GB) 
Hard DriveOSOSMonitor
3x80GB+320GB Linux mint Win 7 Ultimate Benq 24" 
KeyboardPowerCaseMouse
Logitech Dinovo Edge Corsair AX 1200 Cooler master Storm Trooper Logitech G7 Wireless 
  hide details  
Reply
post #4 of 6
np
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom 9600 BE Asus M3A32-MVP Deluxe Watercooled Saphire 1GB 3870 X2 4 GB DDR2 800 OCZ HTC Reaper 
Hard DriveOptical DriveOSMonitor
2 x WD 500GB SATA 2 2 x SATA DVD-RW Vista Ultimate 32" HD TFT on HDMI 
KeyboardPowerCaseMouse
Saitek Eclipse II Zalman 850 Watt Heatpipe cooled Gigabyte Mercury 3D Genius Navigator 525 
Mouse Pad
Desk 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom 9600 BE Asus M3A32-MVP Deluxe Watercooled Saphire 1GB 3870 X2 4 GB DDR2 800 OCZ HTC Reaper 
Hard DriveOptical DriveOSMonitor
2 x WD 500GB SATA 2 2 x SATA DVD-RW Vista Ultimate 32" HD TFT on HDMI 
KeyboardPowerCaseMouse
Saitek Eclipse II Zalman 850 Watt Heatpipe cooled Gigabyte Mercury 3D Genius Navigator 525 
Mouse Pad
Desk 
  hide details  
Reply
post #5 of 6
Is that some form of basic? doesn't look like VB.
Nightshade
(20 items)
 
  
CPUMotherboardGraphicsGraphics
i7-4930k Asus Rampage IV Extreme EVGA - Titan-X Superclocked EVGA - Titan-X 
RAMHard DriveHard DriveHard Drive
64 GB Corsair Vengance DDR3 OCZ Agility 3 Intel 540 240GB 7200 RPM Platter Drive 
Hard DriveCoolingOSMonitor
1TB Mushkin SSD Watercooled Windows 10 Pro x64 ASUS ROG Swift 
KeyboardPowerCaseMouse
Razer Black Widow Chroma Corsair RM1000 Corsair 900D Razer Deathadder Chroma 
Mouse PadAudioOther
Steelseries Soundblaster Z Speakers: Logitech z5500 
  hide details  
Reply
Nightshade
(20 items)
 
  
CPUMotherboardGraphicsGraphics
i7-4930k Asus Rampage IV Extreme EVGA - Titan-X Superclocked EVGA - Titan-X 
RAMHard DriveHard DriveHard Drive
64 GB Corsair Vengance DDR3 OCZ Agility 3 Intel 540 240GB 7200 RPM Platter Drive 
Hard DriveCoolingOSMonitor
1TB Mushkin SSD Watercooled Windows 10 Pro x64 ASUS ROG Swift 
KeyboardPowerCaseMouse
Razer Black Widow Chroma Corsair RM1000 Corsair 900D Razer Deathadder Chroma 
Mouse PadAudioOther
Steelseries Soundblaster Z Speakers: Logitech z5500 
  hide details  
Reply
post #6 of 6
microsoft vba (visual basic for applications) it only works in office
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom 9600 BE Asus M3A32-MVP Deluxe Watercooled Saphire 1GB 3870 X2 4 GB DDR2 800 OCZ HTC Reaper 
Hard DriveOptical DriveOSMonitor
2 x WD 500GB SATA 2 2 x SATA DVD-RW Vista Ultimate 32" HD TFT on HDMI 
KeyboardPowerCaseMouse
Saitek Eclipse II Zalman 850 Watt Heatpipe cooled Gigabyte Mercury 3D Genius Navigator 525 
Mouse Pad
Desk 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom 9600 BE Asus M3A32-MVP Deluxe Watercooled Saphire 1GB 3870 X2 4 GB DDR2 800 OCZ HTC Reaper 
Hard DriveOptical DriveOSMonitor
2 x WD 500GB SATA 2 2 x SATA DVD-RW Vista Ultimate 32" HD TFT on HDMI 
KeyboardPowerCaseMouse
Saitek Eclipse II Zalman 850 Watt Heatpipe cooled Gigabyte Mercury 3D Genius Navigator 525 
Mouse Pad
Desk 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming