LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Vsn Vsn is offline
external usenet poster
 
Posts: 21
Default What do I do wrong [Excuses pushing the wrong key combination earlier]

Hi all,

Who could give me a clue on what I do wrong, I realy can't get it right
here.

I export data from Access to Excel, so far all fine. Than I format the excel
sheet a bit etc. als ok. But now I would like to write a formula to a group
of cells, and this does not work and i can't figure out what goes wrong, the
cells just apear blank.

Dim intT As Integer, stgText As String
With objActiveWorkSheet
For intT = 2 To (stgMaxRow - 5)
stgText = "=IF(F" & Trim(Str(intT)) & "1000;" & Chr(34) & "X" &
Chr(34) & ";" & Chr(34) & "" & Chr(34) & ")"
'stgText = "-" & stgText
.Cells(intT, 11) = stgText
Next
End With

If I put any character in front of the string stgText it just prints the
text without trouble. Just to get the Excel formula to work seems a problem.
And strange enough I manage to to it elsewere in the sheet with
..Cells(Val(stgMaxRow) - 3, 6) = "=sum(F2:F" & Trim(Str(Val(stgMaxRow) - 5))
& ")"

Suggestions are highly appriciated.

Cheers,
Ludovic


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What am I doing wrong aussiegirlone Excel Discussion (Misc queries) 15 July 18th 09 10:08 AM
Insert Calculated Field (wrong Qty*Price = wrong Amount) Edmund Excel Discussion (Misc queries) 8 October 4th 07 12:13 PM
What is wrong with this? Conan Kelly Excel Programming 4 December 9th 05 02:27 AM
What's Wrong? Pam Excel Programming 2 September 24th 04 07:10 PM
What is wrong in this Sub? Michael[_27_] Excel Programming 3 August 18th 04 06:46 PM


All times are GMT +1. The time now is 05:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"