|
-
Nov 12th, 2009, 07:19 AM
#1
Thread Starter
Fanatic Member
Insert new column Excel 2002 (xp ) x Excel 2000
Hi
I did the source code of my application with VB and Excel is 2002 (xp), But when I put my application in server
The application no show
Environment of my machine is Excel 2002 and environment of Server (CTRIX) is Excel 2000
figure01 no work
figure02 work fine
My code
Code:
'Insere Coluna
.Columns("AF:AF").Select
.Selection.Insert Shift:=xlToRight
'Cabeçalho
.Range("AF3").Select
.ActiveCell.FormulaR1C1 = "Data de Expedição"
'Acrescenta Dados do Array na coluna
.Range("AF4:AF" & CStr(3 + UBound(Dt_Expedicao))).Value = Application.WorksheetFunction.Transpose(Dt_Expedicao)
.Range("AF4:AF" & CStr(3 + UBound(Dt_Expedicao))).HorizontalAlignment = xlCenter
.Range("E1").Select
-
Nov 12th, 2009, 03:19 PM
#2
Re: Insert new column Excel 2002 (xp ) x Excel 2000
are macros allowed on the server?
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Nov 20th, 2009, 09:29 AM
#3
Thread Starter
Fanatic Member
Re: Insert new column Excel 2002 (xp ) x Excel 2000
Macros in Server are allowed
I installed Excel 2000 in my computer and did not work too, I tried with code VB and using sheet manually and did not work
-
Nov 20th, 2009, 10:53 AM
#4
Re: Insert new column Excel 2002 (xp ) x Excel 2000
If I just have a look at the images and go by them then the first thing that I notice is that the column is not being inserted... so the problem actually could be here...
'Insere Coluna
.Columns("AF:AF").Select
.Selection.Insert Shift:=xlToRight
I not sure if that was how a column is inserted in Excel 2000...
Also a suggestion...
avoid using .Select
Directly perform the opreration that you want to do.. For example this
.Range("AF3").Select
.ActiveCell.FormulaR1C1 = "Data de Expedição"
can also be written as
Code:
.Range("AF3").FormulaR1C1 = "Data de Expedição"
Hope this helps...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|