Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Excel/Word VBA question?
New Posts  All Forums:Forum Nav:

Excel/Word VBA question? - Page 2

post #11 of 14
Quote:
Originally Posted by Lee17 View Post

It is my work as student biggrin.gifand I work better with computer than poeple

"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." thumb.gif
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #12 of 14
Thread Starter 
"Give a man a fish and feed you feed him for a day". He will come tomorrow to buy more fish biggrin.gif

I understand what you try to teach me, but I feel like they will be better to learn the minimum. It work and the are happy, it don't, they will use the old fashion way and my work will have be done for nothing.

And other reason why I want the put the certificate on all computer is because I have like 10+ excel documents. I think it worth the time.

Lee17
BlueLord
(24 items)
 
 
Takeda
(11 items)
 
CPUMotherboardGraphicsRAM
i7 3770k Asus P8P67 Deluxe Sapphire 6950 (Unlock to 6970) Samsung Wonder Ram 2x4GB 
Hard DriveHard DriveHard DriveCooling
Samsung Spinpoint F3 500GB Crucial SSD M4 64GB Seagate Barracuda ST3000DM001 3TB Rasa CPU block 
CoolingCoolingCoolingCooling
XSPC RS240 Radiator Feser Black UV Tubing D5 Vario 4x Gentle Typhoon + 6 Corsair SP 
CoolingOSMonitorMonitor
Koolance 360 30fpi Windows 7 Professionnal Dell U2211H  Samsung S22B300 x2 
KeyboardPowerCaseMouse
Ducky Overclock.net Edition DK9008G2 PRO Red Antec TP-750 Blue NZXT Switch 810 white Razer DeathAdder 
Mouse PadAudioAudio
Goliathus Ohm Asus Xonar DX 7.1 AudioTechnica ATH-M50 
CPUMotherboardGraphicsRAM
i5 2400 Biostar TP67XE MSI R7850 Twin Frozr G.Skill Ripjaws 2x4GB 
Hard DriveCoolingPowerCase
Samsung Spinpoint F3 Cooler master Hyper 212+ Thermaltake TR2 600W Haf 912 
CPUMotherboardGraphicsRAM
i5 2500k Asus P8Z77-V LK MSI Twin Frozr 7950 Patriot Viper Xtreme DDR3 2000MHz CL11 
Hard DriveCoolingOSMonitor
Seagate Barracuda 500GB CoolerMaster Hyper 212 Evo Windows 7 Professionnal 1440x900 
PowerCaseMouse
Rosewill Capstone 550w CoolerMaster Storm Scout Roccat Savu 
  hide details  
Reply
BlueLord
(24 items)
 
 
Takeda
(11 items)
 
CPUMotherboardGraphicsRAM
i7 3770k Asus P8P67 Deluxe Sapphire 6950 (Unlock to 6970) Samsung Wonder Ram 2x4GB 
Hard DriveHard DriveHard DriveCooling
Samsung Spinpoint F3 500GB Crucial SSD M4 64GB Seagate Barracuda ST3000DM001 3TB Rasa CPU block 
CoolingCoolingCoolingCooling
XSPC RS240 Radiator Feser Black UV Tubing D5 Vario 4x Gentle Typhoon + 6 Corsair SP 
CoolingOSMonitorMonitor
Koolance 360 30fpi Windows 7 Professionnal Dell U2211H  Samsung S22B300 x2 
KeyboardPowerCaseMouse
Ducky Overclock.net Edition DK9008G2 PRO Red Antec TP-750 Blue NZXT Switch 810 white Razer DeathAdder 
Mouse PadAudioAudio
Goliathus Ohm Asus Xonar DX 7.1 AudioTechnica ATH-M50 
CPUMotherboardGraphicsRAM
i5 2400 Biostar TP67XE MSI R7850 Twin Frozr G.Skill Ripjaws 2x4GB 
Hard DriveCoolingPowerCase
Samsung Spinpoint F3 Cooler master Hyper 212+ Thermaltake TR2 600W Haf 912 
CPUMotherboardGraphicsRAM
i5 2500k Asus P8Z77-V LK MSI Twin Frozr 7950 Patriot Viper Xtreme DDR3 2000MHz CL11 
Hard DriveCoolingOSMonitor
Seagate Barracuda 500GB CoolerMaster Hyper 212 Evo Windows 7 Professionnal 1440x900 
PowerCaseMouse
Rosewill Capstone 550w CoolerMaster Storm Scout Roccat Savu 
  hide details  
Reply
post #13 of 14
Thread Starter 
I have two combobox in a userform and they aren't working, i think. I try to with the result in my worksheet but I does nothing.

I want that when I click on the commandbutton, the to result of my combobox are "print" in the activate worksheet.

I have already initialize my combobox, this is only the second part of the combobox.

' Choix du chromatographe
Select Case Chromatographe.Value
Case 0 ' Agilent 7890A
Range("D1").Value = "Agilent 7890A"
Case 1 ' Varian CP-3800
Range("D1").Value = "Varian CP-3800"
End Select

' Choix de l'usine
Select Case Usine.Value
Case 0 ' Bec 1
Range("B1").Value = "Bec 1"
Case 1 ' Bec 2
Range("B1").Value = "Bec 2"
Case 2 ' Autre
Range("B1").Value = "Autre"
End Select

(sorry for the french rolleyes.gif)

Thanks for the help!

Lee17

Edit: I found, I so stupid... Usine.listitem and not .value
Edited by Lee17 - 8/15/12 at 8:00am
BlueLord
(24 items)
 
 
Takeda
(11 items)
 
CPUMotherboardGraphicsRAM
i7 3770k Asus P8P67 Deluxe Sapphire 6950 (Unlock to 6970) Samsung Wonder Ram 2x4GB 
Hard DriveHard DriveHard DriveCooling
Samsung Spinpoint F3 500GB Crucial SSD M4 64GB Seagate Barracuda ST3000DM001 3TB Rasa CPU block 
CoolingCoolingCoolingCooling
XSPC RS240 Radiator Feser Black UV Tubing D5 Vario 4x Gentle Typhoon + 6 Corsair SP 
CoolingOSMonitorMonitor
Koolance 360 30fpi Windows 7 Professionnal Dell U2211H  Samsung S22B300 x2 
KeyboardPowerCaseMouse
Ducky Overclock.net Edition DK9008G2 PRO Red Antec TP-750 Blue NZXT Switch 810 white Razer DeathAdder 
Mouse PadAudioAudio
Goliathus Ohm Asus Xonar DX 7.1 AudioTechnica ATH-M50 
CPUMotherboardGraphicsRAM
i5 2400 Biostar TP67XE MSI R7850 Twin Frozr G.Skill Ripjaws 2x4GB 
Hard DriveCoolingPowerCase
Samsung Spinpoint F3 Cooler master Hyper 212+ Thermaltake TR2 600W Haf 912 
CPUMotherboardGraphicsRAM
i5 2500k Asus P8Z77-V LK MSI Twin Frozr 7950 Patriot Viper Xtreme DDR3 2000MHz CL11 
Hard DriveCoolingOSMonitor
Seagate Barracuda 500GB CoolerMaster Hyper 212 Evo Windows 7 Professionnal 1440x900 
PowerCaseMouse
Rosewill Capstone 550w CoolerMaster Storm Scout Roccat Savu 
  hide details  
Reply
BlueLord
(24 items)
 
 
Takeda
(11 items)
 
CPUMotherboardGraphicsRAM
i7 3770k Asus P8P67 Deluxe Sapphire 6950 (Unlock to 6970) Samsung Wonder Ram 2x4GB 
Hard DriveHard DriveHard DriveCooling
Samsung Spinpoint F3 500GB Crucial SSD M4 64GB Seagate Barracuda ST3000DM001 3TB Rasa CPU block 
CoolingCoolingCoolingCooling
XSPC RS240 Radiator Feser Black UV Tubing D5 Vario 4x Gentle Typhoon + 6 Corsair SP 
CoolingOSMonitorMonitor
Koolance 360 30fpi Windows 7 Professionnal Dell U2211H  Samsung S22B300 x2 
KeyboardPowerCaseMouse
Ducky Overclock.net Edition DK9008G2 PRO Red Antec TP-750 Blue NZXT Switch 810 white Razer DeathAdder 
Mouse PadAudioAudio
Goliathus Ohm Asus Xonar DX 7.1 AudioTechnica ATH-M50 
CPUMotherboardGraphicsRAM
i5 2400 Biostar TP67XE MSI R7850 Twin Frozr G.Skill Ripjaws 2x4GB 
Hard DriveCoolingPowerCase
Samsung Spinpoint F3 Cooler master Hyper 212+ Thermaltake TR2 600W Haf 912 
CPUMotherboardGraphicsRAM
i5 2500k Asus P8Z77-V LK MSI Twin Frozr 7950 Patriot Viper Xtreme DDR3 2000MHz CL11 
Hard DriveCoolingOSMonitor
Seagate Barracuda 500GB CoolerMaster Hyper 212 Evo Windows 7 Professionnal 1440x900 
PowerCaseMouse
Rosewill Capstone 550w CoolerMaster Storm Scout Roccat Savu 
  hide details  
Reply
post #14 of 14
Thread Starter 
Everything in my excel document work fine and I start a second project.

I need to do a report. I try so use VBA in MS Word. I know that word don't like the Object style of programation frown.gif

I try to add title and a total of 8 paragraphs but they are always rewrite on my second paragraphs. I dont understand why.
Here is my starting code :

' Titre du rapport
ActiveDocument.Paragraphs.Add
With ActiveDocument.Paragraphs(1)
.Range.Text = "Rapport des résultats d'analyse spéciale"
.Style = "Titre 1"
.Alignment = wdAlignParagraphCenter
End With

' En tete, information général
Selection.EndKey Unit:=wdStory
ActiveDocument.Paragraphs.Add
With ActiveDocument.Paragraphs(2)
.Range.Text = vbCrLf & "Date : " & _
Chr(11) & "Émetteur : " & _
Chr(11) & "Secteur : " & _
Chr(11) & "Sujet : " & _
vbCrLf
.Style = "Normal"
.Alignment = wdAlignParagraphLeft
End With

' Paragraphe d'observation
Selection.EndKey Unit:=wdStory
ActiveDocument.Paragraphs.Add
With ActiveDocument.Paragraphs(3)
.Range.Text = vbCrLf & "Observation : "
.Style = "Normal"
.Alignment = wdAlignParagraphLeft
End With

(In a sub fonction)

What it does now its wirte the title properly, write the 2nd para and it over write it after with the 3rd one.
What can I do to avoid that.

Also, how I clean my document to start my macro in an empty document.

Thank you, Lee17

Edit: I found a way with bookmark, work like a charm biggrin.gif
Edited by Lee17 - 8/17/12 at 7:34am
BlueLord
(24 items)
 
 
Takeda
(11 items)
 
CPUMotherboardGraphicsRAM
i7 3770k Asus P8P67 Deluxe Sapphire 6950 (Unlock to 6970) Samsung Wonder Ram 2x4GB 
Hard DriveHard DriveHard DriveCooling
Samsung Spinpoint F3 500GB Crucial SSD M4 64GB Seagate Barracuda ST3000DM001 3TB Rasa CPU block 
CoolingCoolingCoolingCooling
XSPC RS240 Radiator Feser Black UV Tubing D5 Vario 4x Gentle Typhoon + 6 Corsair SP 
CoolingOSMonitorMonitor
Koolance 360 30fpi Windows 7 Professionnal Dell U2211H  Samsung S22B300 x2 
KeyboardPowerCaseMouse
Ducky Overclock.net Edition DK9008G2 PRO Red Antec TP-750 Blue NZXT Switch 810 white Razer DeathAdder 
Mouse PadAudioAudio
Goliathus Ohm Asus Xonar DX 7.1 AudioTechnica ATH-M50 
CPUMotherboardGraphicsRAM
i5 2400 Biostar TP67XE MSI R7850 Twin Frozr G.Skill Ripjaws 2x4GB 
Hard DriveCoolingPowerCase
Samsung Spinpoint F3 Cooler master Hyper 212+ Thermaltake TR2 600W Haf 912 
CPUMotherboardGraphicsRAM
i5 2500k Asus P8Z77-V LK MSI Twin Frozr 7950 Patriot Viper Xtreme DDR3 2000MHz CL11 
Hard DriveCoolingOSMonitor
Seagate Barracuda 500GB CoolerMaster Hyper 212 Evo Windows 7 Professionnal 1440x900 
PowerCaseMouse
Rosewill Capstone 550w CoolerMaster Storm Scout Roccat Savu 
  hide details  
Reply
BlueLord
(24 items)
 
 
Takeda
(11 items)
 
CPUMotherboardGraphicsRAM
i7 3770k Asus P8P67 Deluxe Sapphire 6950 (Unlock to 6970) Samsung Wonder Ram 2x4GB 
Hard DriveHard DriveHard DriveCooling
Samsung Spinpoint F3 500GB Crucial SSD M4 64GB Seagate Barracuda ST3000DM001 3TB Rasa CPU block 
CoolingCoolingCoolingCooling
XSPC RS240 Radiator Feser Black UV Tubing D5 Vario 4x Gentle Typhoon + 6 Corsair SP 
CoolingOSMonitorMonitor
Koolance 360 30fpi Windows 7 Professionnal Dell U2211H  Samsung S22B300 x2 
KeyboardPowerCaseMouse
Ducky Overclock.net Edition DK9008G2 PRO Red Antec TP-750 Blue NZXT Switch 810 white Razer DeathAdder 
Mouse PadAudioAudio
Goliathus Ohm Asus Xonar DX 7.1 AudioTechnica ATH-M50 
CPUMotherboardGraphicsRAM
i5 2400 Biostar TP67XE MSI R7850 Twin Frozr G.Skill Ripjaws 2x4GB 
Hard DriveCoolingPowerCase
Samsung Spinpoint F3 Cooler master Hyper 212+ Thermaltake TR2 600W Haf 912 
CPUMotherboardGraphicsRAM
i5 2500k Asus P8Z77-V LK MSI Twin Frozr 7950 Patriot Viper Xtreme DDR3 2000MHz CL11 
Hard DriveCoolingOSMonitor
Seagate Barracuda 500GB CoolerMaster Hyper 212 Evo Windows 7 Professionnal 1440x900 
PowerCaseMouse
Rosewill Capstone 550w CoolerMaster Storm Scout Roccat Savu 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Excel/Word VBA question?